Bug 2334217

Summary: Please branch and build python-pydantic in epel10
Product: [Fedora] Fedora EPEL Reporter: Ben Beasley <code>
Component: python-pydanticAssignee: Ben Beasley <code>
Status: CLOSED ERRATA QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel10CC: code, jkyjovsk, maxwell, python-packagers-sig, romain.geissler
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-pydantic-2.9.2-3.el10_0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-01-21 03:33:25 UTC 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: 2334216    
Bug Blocks: 1914423, 2335350, 2335578, 2336419    

Description Ben Beasley 2024-12-26 15:20:56 UTC
Please branch and build python-pydantic in epel10.

Comment 1 Ben Beasley 2024-12-26 15:22:01 UTC
Since I am already a maintainer of this package, and I want to branch Pydantic for EPEL10, I’m creating this and assigning it to myself so we have a tracking bug for dependencies.

Comment 2 Ben Beasley 2024-12-26 15:32:27 UTC
If python-pytest-subtests is branched and built, and we do a bootstrap build of python-dirty-equals, then a bootstrap build of python-inline-snapshot lacks the following:

No matching package to install: 'python3dist(asttokens) >= 2.0.5'
No matching package to install: 'python3dist(black) >= 23.3'
No matching package to install: 'python3dist(executing) >= 2.1'
No matching package to install: 'python3dist(rich) >= 13.7.1'

(Black is not just a linter here; python-inline-snapshot uses it at runtime to format generated code.)

Comment 3 Ben Beasley 2024-12-26 15:43:10 UTC
A comment on working around the possibility that black will *not* be branched: https://bugzilla.redhat.com/show_bug.cgi?id=2332437#c5

Comment 4 Ben Beasley 2024-12-26 16:16:16 UTC
I went ahead and skipped the snapshot tests in python-pydantic-core for EPEL10, removing python-black from its dependency chain. Since this means we don’t use python-inline-snapshot, we also don’t need any of the dependencies from https://bugzilla.redhat.com/show_bug.cgi?id=2334217#c2.

Next we hit:

 Problem 1: nothing provides requested (crate(enum_dispatch/default) >= 0.3.13 with crate(enum_dispatch/default) < 0.4.0~)
 Problem 2: nothing provides requested (crate(jiter/default) >= 0.7.1 with crate(jiter/default) < 0.8.0~)
 Problem 3: nothing provides requested (crate(jiter/python) >= 0.7.1 with crate(jiter/python) < 0.8.0~)
 Problem 4: nothing provides requested (crate(speedate/default) >= 0.15.0 with crate(speedate/default) < 0.16.0~)
 Problem 5: nothing provides requested (crate(strum/default) >= 0.26.3 with crate(strum/default) < 0.27.0~)
 Problem 6: nothing provides requested (crate(strum/derive) >= 0.26.3 with crate(strum/derive) < 0.27.0~)
 Problem 7: nothing provides requested (crate(strum_macros/default) >= 0.26.4 with crate(strum_macros/default) < 0.27.0~)
 Problem 8: nothing provides requested (python3dist(maturin) < 2~~ with python3dist(maturin) >= 1)

(Maturin for EPEL10 is in testing: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-2c1b37a7bc)

Comment 5 Romain Geissler 2025-01-04 16:59:06 UTC
I have added this as a blocker for python-dirty-equals, but it seems there is some kind of circular dependencies between python-dirty-equals and python-pydantic, not sure in which order though. It seems you mentionend that in comment c#2

Comment 6 Ben Beasley 2025-01-04 18:32:53 UTC
There’s a bootstrap bcond in python-dirty-equals that disables its Pydantic integration tests, so we can do a bootstrap build without Pydantic. Then we can build python-pydantic-core (which needs dirty-equals for its tests), then python-pydantic, then go back and do a non-bootstrap build of python-dirty-equals.

Comment 7 Ben Beasley 2025-01-10 16:32:03 UTC
Once python-pytest-subtests is ready (bug 2334216), and if I branch and build python-dirty-equals (a bootstrap build at first) along with rust-enum_dispatch, rust-jiter, rust-lexical-parse-float, rust-lexical-parse-integer, rust-lexical-util, and rust-speedate, then I can build python-pydantic-core, and this is what python-pydantic tells me:

No matching package to install: 'python3dist(annotated-types) >= 0.6'
Package python3-cloudpickle-3.0.0-8.el10_0.noarch is already installed.
Package python3-dirty-equals-0.8.0-2.el10~bootstrap.noarch is already installed.
Package python3-hatch-fancy-pypi-readme-24.1.0-3.el10_0.noarch is already installed.
Package python3-hatchling-1.24.2-9.el10.noarch is already installed.
Package python3-jsonschema-4.19.1-7.el10.noarch is already installed.
Package python3-packaging-23.2-6.el10.noarch is already installed.
Package python3-pip-23.3.2-7.el10.noarch is already installed.
Package python3-pydantic-core-2.27.2-2.el10.x86_64 is already installed.
Package python3-pytest-7.4.3-5.el10.noarch is already installed.
Package python3-pytest-mock-3.14.0-2.el10_0.noarch is already installed.
Package python3-pytz-2024.1-3.el10_0.noarch is already installed.
Package python3-rich-13.9.4-1.el10_0.noarch is already installed.
No matching package to install: 'python3dist(typing-extensions) >= 4.12.2'

I am a co-maintainer with admin privilege on python-typing-extensions and python-annotated-types, so I feel comfortable branching them without going through the EPEL request process, too.

Given all that – and a minor spec-file adjustment in https://src.fedoraproject.org/rpms/python-pydantic/c/447df031fb89c4019113a4d3eae0fbbeddbc06dd?branch=rawhide – it looks like everything is ready for Pydantic in EPEL10 as soon as the python-pytest-subtests request is resolved.

See: https://copr.fedorainfracloud.org/coprs/music/rust-epel10/packages/

Comment 8 Ben Beasley 2025-01-17 18:13:01 UTC
It turns out that python-pytest-subtests is already in CRB for EL10[1], so it’s not eligible for EPEL10. I will need to work with what is already there.

On the other hand, it looks like I only needed that for python-inline-snapshot, and as mentioned in [2], I will already be skipping snapshot tests for EPEL10, so I guess that’s just fine.

It turns out that python-typing-extensions is in the base OS, too, but it’s 4.9.0 and Pydantic wants 4.12.2. I’m investigating what can be done about that. It looks like Pydantic allowed typing-extensions 4.6.1 (for Python 3.12 and older) and then [4] made the minimum 4.12.2 across the board.

We could probably branch and build Pydantic 2.9.2, but we will be stuck with it forever. (Let’s be honest; we will probably have a limited ability, if any, to update Pydantic without running into breaking changes once we branch it anyway, but it’s a shame to have to start out with branching an old version.)

[1] https://tiny.distro.builders/view-rpm--view-c10s--python3-pytest-subtests.html
[2] https://bugzilla.redhat.com/show_bug.cgi?id=2334217#c4
[3] https://tiny.distro.builders/view-rpm--view-c10s--python3-typing-extensions.html
[4] https://github.com/pydantic/pydantic/pull/10678

Comment 9 Fedora Update System 2025-01-17 23:57:38 UTC
FEDORA-EPEL-2025-4798fe787b (python-annotated-types-0.7.0-3.el10_0, python-dirty-equals-0.9.0-1.el10_0, and 8 more) has been submitted as an update to Fedora EPEL 10.0.
https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2025-4798fe787b

Comment 10 Fedora Update System 2025-01-18 02:08:55 UTC
FEDORA-EPEL-2025-4798fe787b has been pushed to the Fedora EPEL 10.0 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2025-4798fe787b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2025-01-21 03:33:25 UTC
FEDORA-EPEL-2025-4798fe787b (python-annotated-types-0.7.0-3.el10_0, python-dirty-equals-0.9.0-1.el10_0, and 8 more) has been pushed to the Fedora EPEL 10.0 stable repository.
If problem still persists, please make note of it in this bug report.