Bug 2332437

Summary: Please branch and build python3-black in epel10
Product: [Fedora] Fedora Reporter: Romain Geissler <romain.geissler>
Component: python-blackAssignee: Christian Heimes <cheimes>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 42CC: cheimes, code, cquike, mhroncok, python-packagers-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2331015, 2331016, 2332434, 2332436, 2348944    
Bug Blocks:    

Description Romain Geissler 2024-12-15 00:54:58 UTC
Hi,

Please branch and build python3-black in epel10.

Cheers,
Romain

Reproducible: Always

Comment 1 Miro Hrončok 2024-12-15 13:08:53 UTC
As said in bz2319803, I personally (as a co-maintainer) would be reluctant to maintain black for 10+ years while maintaining backward compatibility.

Comment 2 Romain Geissler 2024-12-15 13:45:34 UTC
black is used in almost all tests of python-hypothesmith. So if black won't make it in EPEL 10, does this change disabling tests in hypothesmith make sense ? https://src.fedoraproject.org/rpms/python-hypothesmith/pull-request/2

Comment 3 Miro Hrončok 2024-12-16 14:00:13 UTC
Can the dependency on black be removed from the tests instead? How is it used?

Comment 4 Romain Geissler 2024-12-16 15:58:22 UTC
I have found this proposal upstream to make black optional in tests https://github.com/Zac-HD/hypothesmith/pull/23 and the principle of removing black was refused (as apparently black is an important part of the test). Note that I don't know anything myself about hypothesmith, it just happens to be itself a (test) dependency of another package in a chain of dependency.

Comment 5 Ben Beasley 2024-12-26 15:42:30 UTC
Since maturin is now in EPEL10, I was looking at the dependency tree for python-pydantic. One of the test dependencies for python-pydantic-core is python-inline-snapshot, which uses black as a hard runtime dependency for formatting generated code. So if black won’t be branched for EPEL10, we’ll have the following choices:

- Intrusively patch inline-snapshot to replace black formatting with a no-op, or perhaps at some point with ruff. This isn’t attractive, and I hesitate to ship a package with possibly divergent behavior.
- Patch inline-snapshot out of the test dependencies for pydantic-core, and skip all of the snapshot tests. This is probably the best choice, although it hurts test coverage.

The python-fastapi package also uses python-inline-snapshot as a test dependency, so if I end up branching it in EPEL10, the same choices will apply.

I’m not saying we *have* to branch black, just adding more context for its non-linting applications.

Comment 6 Ben Beasley 2024-12-26 15:45:50 UTC
(In reply to Ben Beasley from comment #5)
> - Patch inline-snapshot out of the test dependencies for pydantic-core, and
> skip all of the snapshot tests. This is probably the best choice, although
> it hurts test coverage.

(We’re already doing this in F40, where dependencies are too old for python-inline-snapshot, so it would be easy to do it in EPEL10 as well.)

Comment 7 Ben Beasley 2024-12-26 16:11:48 UTC
I went ahead and skipped the snapshot tests in python-pydantic-core for EPEL10, removing python-black from its dependency chain.

Comment 8 Miro Hrončok 2024-12-27 11:18:32 UTC
BTW I have no problem if somebody wants to maintain black in EPEL for a decade. I just expressed my lack of willingness to do it myself.

Comment 9 Aoife Moloney 2025-02-26 13:20:04 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 10 Romain Geissler 2025-03-26 00:49:15 UTC
If someone needs black in EPEL 10 in the future (for now my users didn't ask for it, maybe eventually they will), FYI the current rawhide version (24.4.2) builds fine on EPEL 10: https://koji.fedoraproject.org/koji/taskinfo?taskID=130756452

Comment 11 Romain Geissler 2025-04-07 19:22:37 UTC
Note: ruff was recently built for EPEL 10, so people landing on this ticket needing a python linter for their own projects might instead consider ruff as a possible alternative.

Comment 12 Ben Beasley 2025-05-22 11:19:11 UTC
*** Bug 2367968 has been marked as a duplicate of this bug. ***