Bug 2174232
| Summary: | [RFE: EPEL9] EPEL9 branch for python-black | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Pat Riehecky <riehecky> |
| Component: | python-black | Assignee: | Christian Heimes <cheimes> |
| Status: | NEW --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | cheimes, code, mhroncok, python-packagers-sig |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Bug | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Pat Riehecky
2023-02-28 21:44:20 UTC
python-black does not build on EPEL 9, it's missing several build dependencies: No matching package to install: 'python3dist(hatch-fancy-pypi-readme)' No matching package to install: 'python3dist(hatch-vcs)' No matching package to install: 'python3dist(hatchling) >= 1.8' (In reply to Christian Heimes from comment #1) > python-black does not build on EPEL 9, it's missing several build > dependencies: > > No matching package to install: 'python3dist(hatch-fancy-pypi-readme)' > No matching package to install: 'python3dist(hatch-vcs)' > No matching package to install: 'python3dist(hatchling) >= 1.8' The situation is changing. In bug 2158497, Martin Hoyer showed me that a few dependencies could be safely loosened to open a path to packaging current versions of python-hatchling and python-hatch-vcs in EPEL9, along with hatch itself. See https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-d689ae7c5f, which is in epel-testing for another week. > $ fedpkg --release epel9 mockbuild --enablerepo=epel-testing > > No matching package to install: 'python3dist(hatch-fancy-pypi-readme)' Once the update with current python-hatchling hits EPEL9, https://src.fedoraproject.org/rpms/python-hatch-fancy-pypi-readme could be branched for EPEL9 too. If I add a local EPEL9 build of python-hatch-fancy-pypi-readme: > $ mock -r epel-9-x86_64 --clean && mock -r epel-9-x86_64 -i ~/fedora/other/python-hatch-fancy-pypi-readme/results_python-hatch-fancy-pypi-readme/22.3.0/6.el9/python3-hatch-fancy-pypi-readme-22.3.0-6.el9.noarch.rpm --enablerepo=epel-testing && fedpkg --release epel9 mockbuild --enablerepo=epel-testing --no-clean > > No matching package to install: 'python3dist(packaging) >= 22' > No matching package to install: 'python3dist(tokenize-rt) >= 3.2' > No matching package to install: 'python3dist(uvloop) >= 0.15.2' OK, python-packaging is in the base OS, so it’s a question of whether the minimum version could safely be loosened. The python-uvloop dependency comes from the uvloop extra, which could be disabled for EPEL9 (adding it to EPEL9 is bug 2130665). The python-tokenize-rt dependency comes from the jupyter extra, which could be disabled for EPEL9, or perhaps it could be branched for EPEL9—I haven’t tested it. If I disable both of those extras and blindly loosen the packaging dependency lower version bound to 20.9, the package builds in mock with only one test failure: =================================== FAILURES =================================== ___________________ BlackTestCase.test_infer_target_version ____________________ self = <tests.test_black.BlackTestCase testMethod=test_infer_target_version> def test_infer_target_version(self) -> None: for version, expected in [ ("3.6", [TargetVersion.PY36]), […] (">3.10,<3.11", None), ]: test_toml = {"project": {"requires-python": version}} result = black.files.infer_target_version(test_toml) > self.assertEqual(result, expected) E AssertionError: [<TargetVersion.PY310: 10>, <TargetVersio[35 chars] 12>] != None tests/test_black.py:1575: AssertionError Maybe this came from blindly loosening the packaging version. I’m not sure how serious the failure is. Anyway, hopefully that’s helpful as an outline of how this *might* be possible. I've bee tagged needinfo, but I'm not sure what info is needed from me... As to the dependencies, I'd expect the package maintainer to know better than I which elements can be relaxed, which can be excluded, and which ones need epel branches requested. |