From Fedora Project Wiki
(Initial work on the proposal)
 
(WIP: Detailed Description)
Line 51: Line 51:


<!-- Expand on the summary, if appropriate.  A couple sentences suffices to explain the goal, but the more details you can provide the better. -->
<!-- Expand on the summary, if appropriate.  A couple sentences suffices to explain the goal, but the more details you can provide the better. -->
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 pythn2 RPM macros from {{package|python2-rpm-macros}}/`/usr/lib/rpm/macros.d/macros.python2` and hence decided to remove the package. The following macros will be undefined:
%{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
The following macros will remain defined for the time being to not break packages that are using Python 2 as build-time only dependency:
%{__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 removed.
{{package|python2.7}} will no longer require {{package|python2-rpm-macros}} and {{package|python3-rpm-generators}}.
Packages that used to use those macros in Fedora will need to be adapted to expand the macros or switch to Python 3. In January 2021, we have:
* several Python 2 trac plugins, but {{package|trac}} uses Python 3 now
* several Python 2 sugar packages, but they already don't build or install as {{package|sugar}} uses Python 3 now
* TODO the rest


== Feedback ==
== Feedback ==

Revision as of 16:11, 14 January 2021


Remove Python2 RPM Macros

Summary

The Package-x-generic-16.pngpython2-rpm-macros package (contains /usr/lib/rpm/macros.d/macros.python2) will be removed from Fedora 34 and further. The python2 RPM macros will ceases to exist. Python 2 packages are not allowed any more. Around a dozen of packages use the macros in Fedora and will need to be adjusted either by expanding them or by no longer using Python 2.

Owner

Current status

  • Targeted release: Fedora 34
  • Last updated: 2021-01-14
  • FESCo issue: <will be assigned by the Wrangler>
  • Tracker bug: <will be assigned by the Wrangler>
  • Release notes tracker: <will be assigned by the Wrangler>

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 pythn2 RPM macros from Package-x-generic-16.pngpython2-rpm-macros//usr/lib/rpm/macros.d/macros.python2 and hence decided to remove the package. The following macros will be undefined:

%{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

The following macros will remain defined for the time being to not break packages that are using Python 2 as build-time only dependency:

%{__python2}
%{python2}

The Python 2 section of Python packaging guidelines will be removed.

Package-x-generic-16.pngpython2.7 will no longer require Package-x-generic-16.pngpython2-rpm-macros and Package-x-generic-16.pngpython3-rpm-generators.

Packages that used to use those macros in Fedora will need to be adapted to expand the macros or switch to Python 3. In January 2021, we have:

  • several Python 2 trac plugins, but Package-x-generic-16.pngtrac uses Python 3 now
  • several Python 2 sugar packages, but they already don't build or install as Package-x-generic-16.pngsugar uses Python 3 now
  • TODO the rest

Feedback

Benefit to Fedora

Scope

  • Proposal owners:
  • Other developers: N/A (not a System Wide Change)
  • Policies and guidelines: N/A (not a System Wide Change)
  • Trademark approval: N/A (not needed for this Change)
  • Alignment with Objectives:

Upgrade/compatibility impact

N/A (not a System Wide Change)

How To Test

N/A (not a System Wide Change)

User Experience

Dependencies

N/A (not a System Wide Change)

Contingency Plan

  • Contingency mechanism: (What to do? Who will do it?) N/A (not a System Wide Change)
  • Contingency deadline: N/A (not a System Wide Change)
  • Blocks release? N/A (not a System Wide Change), Yes/No
  • Blocks product? product

Documentation

N/A (not a System Wide Change)

Release Notes