Bug 2175213

Summary: RFE: Add python-tomli to RHEL 9
Product: Red Hat Enterprise Linux 9 Reporter: Miro Hrončok <mhroncok>
Component: python-tomliAssignee: Python Maintainers <python-maint>
Status: VERIFIED --- QA Contact: Lukáš Zachar <lzachar>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.3CC: bstinson, jwboyer, maxwell, mhroncok, python-maint, torsava
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-tomli-2.0.1-5.el9 Doc Type: No Doc Update
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:
Bug Depends On: 2178564, 2178582, 2177269    
Bug Blocks:    

Description Miro Hrončok 2023-03-03 15:00:20 UTC
I would very much like to add python3-tomli to RHEL 9.

The currently shipped TOML-parsing module in python3-toml is deprecated in Fedora [1] and unwanted in RHEL 10 [2]. Projects that wish to support RHEL 9 as well as Fedora and RHEL 10+ need to maintain a complex spaghetti of ifs or try-excepts to choose their TOML-parsing module.

Some Red Hat upstream projects even justify reverting community contributions to migrate to a modern and upstream-maintained TOML parser by the absence of tomli in RHEL 9 [3]. We don't want that. We want all upstreams to be able to switch to tomllib on Python 3.11+ with a fallback to tomli. In order to make that easier for them, we should make tomli available in RHEL 9.

The package is already available in EPEL 9 [4] where I helped with the initial review and the EPEL maintainer is on board with us introducing this package to RHEL proper [5].


[1] https://fedoraproject.org/wiki/Changes/DeprecatePythonToml
[2] https://tiny.distro.builders/config-unwanted--sst_cs_apps-unwanted-python3-eln.html
[3] https://github.com/containers/podman-py/pull/240
[4] https://src.fedoraproject.org/rpms/python-tomli/tree/epel9
[5] https://github.com/containers/podman-py/pull/240#issuecomment-1440308239

Comment 3 Miro Hrončok 2023-03-08 14:15:23 UTC
Addition to the c9s workload: https://github.com/minimization/content-resolver-input/pull/784

Comment 5 Miro Hrončok 2023-03-08 15:51:49 UTC
Diff against EPEL 9: https://src.fedoraproject.org/rpms/python-tomli/pull-request/21

Comment 6 Miro Hrončok 2023-03-09 15:39:28 UTC
(In reply to Miro Hrončok from comment #5)
> Diff against EPEL 9:
> https://src.fedoraproject.org/rpms/python-tomli/pull-request/21

I wnt ahead and added a smoke test TMT plan to the PR as I anticipated it will be required.

Comment 7 Miro Hrončok 2023-03-16 09:41:02 UTC
With mock-core-configs at least 38.3-1.fc37 (currently a pending update):

$ mock -r centos-stream-9-x86_64 init
...
$ mock -r centos-stream-9-x86_64 --enablerepo=local install python3-tomli
...
Installed:
  python3-tomli-2.0.1-5.el9.noarch

Comment 8 Miro Hrončok 2023-03-22 17:38:45 UTC
$ repoquery -q --repo=c9s-appstream python3-tomli
python3-tomli-0:2.0.1-5.el9.noarch

$ repoquery -q --repo=RHEL9.3-AppStream python3-tomli
python3-tomli-0:2.0.1-5.el9.noarch

Yay \o/