This proposal has been heavily modified: https://fedoraproject.org/w/index.php?title=Changes%2FDisable_Python_2_Dist_RPM_Generators_and_Freeze_Python_2_Macros&type=revision&diff=600880&oldid=600675 It has therefore been resubmitted. https://fedoraproject.org/wiki/Changes/Disable_Python_2_Dist_RPM_Generators_and_Freeze_Python_2_Macros = Disable Python 2 Dist RPM Generators and Freeze Python 2 Macros = == Summary == The `python2.7dist()` and `python2dist()` automatic provides/requires from {{package|python-rpm-generators}} will no longer be automatically generated, no functional packages in Fedora use them. The `python(abi) = 2.7` automatic provides/requires will be kept. The {{package|python2-rpm-macros}} package will be removed from Fedora 34 and newer. The python2 RPM macros (`/usr/lib/rpm/macros.d/macros.python2`) will be moved to {{package|python2.7}} and frozen (no new development, except critical bugfixes that affect packages outside the remaining Python 2 ecosystem). Note that Python 2 packages are already not allowed in Fedora, except explicitly granted exceptions. == Owner == * Name: [[User:Churchyard|Miro Hrončok]] * Email: mhroncok@xxxxxxxxxx == 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|python-rpm-generators}} package nor the python2 RPM macros from the {{package|python2-rpm-macros}} package (located at `/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 {{package|python2-rpm-macros}} to {{package|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 {{package|trac}} uses Python 3 now ** only those require `python2dist(...)` / `python2.7dist(...)` * several Python 2 sugar packages, but they already don't build and/or install as {{package|sugar}} uses Python 3 now * 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. {{package|python2.7}} will provide and obsolete {{package|python2-rpm-macros}} at least for 2 more releases (or until it is removed entirely from Fedora). The following macros will remain defined in {{package|python-srpm-macros}} 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): %{__python2} %{python2} The [https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/#_python_2_packages 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 [https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx/thread/MGY7FJTUH5NC6EHTBIEU4TKSEKREBXTH/ 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 {{package|python2.7}} is retired, the macros will go away as well. This is also true for RHEL 9. == Scope == * Proposal owners: ** Disable the `python2dist()`/`python2.7dist()` dependency generators. ** 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}}. * 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|python2-rpm-macros}} package will be obsoleted by {{package|python2.7}}. 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. == 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 {{package|python2-rpm-macros}} is no more. Verify {{package|python2.7}} does not depend on RPM. == 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. -- Ben Cotton He / Him / His Senior Program Manager, Fedora & CentOS Stream Red Hat TZ=America/Indiana/Indianapolis _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx