Churchyard (talk | contribs) m (→Scope) |
|||
Line 163: | Line 163: | ||
== Scope == | == Scope == | ||
* Proposal owners: | * Proposal owners: | ||
** Disable the `python2dist()`/`python2.7dist()` dependency generators. | ** Disable the `python2dist()`/`python2.7dist()` dependency generators: https://src.fedoraproject.org/rpms/python-rpm-generators/pull-request/28 | ||
** Move the python2 macros from {{package|python2-rpm-macros}} to {{package|python2.7}}. | ** Move the python2 macros from {{package|python2-rpm-macros}} to {{package|python2.7}}. | ||
** Remove {{package|python2-rpm-macros}} and obsolete/provide it from {{package|python2.7}}. | ** Remove {{package|python2-rpm-macros}} and obsolete/provide it from {{package|python2.7}}. |
Revision as of 17:18, 3 February 2021
Disable Python 2 Dist RPM Generators and Freeze Python 2 Macros
Summary
The python2.7dist()
and python2dist()
automatic provides/requires from
will no longer be automatically generated, no functional packages in Fedora use them. The python-rpm-generators
python(abi) = 2.7
automatic provides/requires will be kept.
The
package will be removed from Fedora 34 and newer. The python2 RPM macros (python2-rpm-macros
/usr/lib/rpm/macros.d/macros.python2
) will be moved to
and frozen (no new development, except critical bugfixes that affect packages outside the remaining Python 2 ecosystem).
python2.7
Note that Python 2 packages are already not allowed in Fedora, except explicitly granted exceptions.
Owner
- Name: Miro Hrončok
- Email: mhroncok@redhat.com
Current status
- Targeted release: Fedora 34
- Last updated: 2021-02-03
- FESCo issue: #2567
- Tracker bug: #1924801
- Release notes tracker: #656
Detailed Description
Python 2 is upstream dead, usage in Fedora packages is forbidden, except for several package with an explicit FESCo approved exception. The Python Maintenance team no longer wishes to support the python2 dist RPM generators from the
package nor the python2 RPM macros from the python-rpm-generators
package (located at python2-rpm-macros
/usr/lib/rpm/macros.d/macros.python2
) and hence decided to disable the generators for Python 2 and freeze the macros.
Provides/requires like this will no longer be automatically generated in Fedora:
python2dist(...) python2.7dist(...)
Currently, no functional Fedora 34 packages need such provides. The python(abi) = 2.7
automatic provides/requires will be kept.
The following macro definitions will be moved from
to python2-rpm-macros
:
python2.7
%{python2_sitelib} %{python2_sitearch} %{python2_version} %{python2_version_nodots} %{python2_platform} %{py2_shbang_opts} %{py2_shbang_opts_nodash} %{py2_shebang_flags} %py2_shebang_fix %py2_build %py2_build_egg %py2_build_wheel %py2_install %py2_install_egg %py2_install_wheel
And their definition will remain frozen unless a bug is found that affects Fedora packages outside the remaining Python 2 ecosystem. Packagers of Python 2 packages affected by bugs in the macros are encouraged to apply workarounds and/or submit fixes themselves.
Only the following packages use some of the macros:
- several Python 2 trac plugins, but
uses Python 3 nowtrac
- only those require
python2dist(...)
/python2.7dist(...)
- only those require
- several Python 2 sugar packages, but they already don't build and/or install as
uses Python 3 nowsugar
- 13 other affected packages in Fedora (some of them co-owned by Python Maint):
- avahi
- gimp-layer-via-copy-cut
- gimp-resynthesizer
- chromium
- NFStest
- offlineimap
- pygobject2
- pygtk2
- python-psutil
- python-six
- python2-cairo
- python2-dns
- python2-setuptools
Note: Many other packages use the macros in a disabled %if
section.
Some of the listed ones might as well (and hence are not really
impacted), the list is an intersection of packages that (Build)Require
Python 2 and are greppable for the macros.
will provide and obsolete python2.7
at least for 2 more releases (or until it is removed entirely from Fedora).
python2-rpm-macros
The following macros will remain defined in
for the time being to not break packages that are using Python 2 as build-time only dependency (which is also not allowed, but happens more often):
python-srpm-macros
%{__python2} %{python2}
The Python 2 section of Python packaging guidelines will be amended to say that the Python 2 macros may not completely mirror the Python 3 macros.
The changes will happen after the Fedora 34 mass rebuild and before branching.
Feedback
At first, we have proposed to remove the macros entirely. That proposal has received negative feedback and we have reworked it to only freeze the macros and disable the dist generators.
Benefit to Fedora
With each change of the RPM Python dist generators we had to create artificial packages to test the impact on Python 2, because the real set of Python 2 package in Fedora is basically non-existent. By disabling them, we no longer have to worry about breaking things for our downstreams or projects building atop Fedora.
In the past, we tried to keep the macros as similar to their Python 3 counterparts as possible, but we have decided that it is not worth it for 13 packages. This way, historical packages can still be built atop Fedora with the macros, but we don't need to worry about keeping them up-to-date. Once
is retired, the macros will go away as well. This is also true for RHEL 9.
python2.7
Scope
- Proposal owners:
- Disable the
python2dist()
/python2.7dist()
dependency generators: https://src.fedoraproject.org/rpms/python-rpm-generators/pull-request/28 - Move the python2 macros from
topython2-rpm-macros
.python2.7
- Remove
and obsolete/provide it frompython2-rpm-macros
.python2.7
- Disable the
- Other developers: No action required.
- Release engineering: no impact on Release Engineering is anticipated
- Policies and guidelines: a note will be added to the Python 2 guidelines
- Trademark approval: Not necessary.
- Alignment with Objectives: Not really.
Upgrade/compatibility impact
The
package will be obsoleted by python2-rpm-macros
. Users that happened to have the macros installed but not the interpreter will suddenly pull the interpreter on upgrades, but we think that's a reasonable compromise.
python2.7
How To Test
Build a Python 2 package that used to provide and/or require python2.7dist()
or python2dist()
automatically. Verify it does not do that. Verify it still requires python(abi) = 2.7
. Verify the macros are still defined. Verify
is no more. Verify python2-rpm-macros
does not depend on RPM.
python2.7
Packager Experience
Mildly worse for packagers building Python 2 RPMs atop Fedora. If such packagers need the dist generators to do so, they are encouraged to build their own version. Feel free to talk to the change owner about how to do that.
Fedora packages are not affected.
Dependencies
None.
Contingency Plan
- Contingency mechanism: Revert the changes.
- Contingency deadline: Beta freeze.
- Blocks release? No.
- Blocks product? No.
Documentation
This page is the documentation for the affected 3rd party packagers.