Bug 2174232 - [RFE: EPEL9] EPEL9 branch for python-black
Summary: [RFE: EPEL9] EPEL9 branch for python-black
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-black
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Christian Heimes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-28 21:44 UTC by Pat Riehecky
Modified: 2023-08-14 13:49 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Pat Riehecky 2023-02-28 21:44:20 UTC
Description of problem:
Would you be willing to branch and build python-black for EPEL9?

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Christian Heimes 2023-08-12 10:26:41 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'

Comment 2 Ben Beasley 2023-08-12 12:46:43 UTC
(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.

Comment 3 Pat Riehecky 2023-08-14 13:49:37 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.