- 1 Retire Python 2
- 1.1 Summary
- 1.2 Owner
- 1.3 Current status
- 1.4 Detailed Description
- 1.5 Benefit to Fedora
- 1.6 Scope
- 1.7 Upgrade/compatibility impact
- 1.8 How To Test
- 1.9 User Experience
- 1.10 Dependencies
- 1.11 Contingency Plan
- 1.12 Documentation
- 1.13 Release Notes
Retire Python 2
package and all its subpackages will be removed from Fedora 32.
package for developers and users will be provided.
All packages in Fedora that need Python 2 to run will be removed from Fedora 32 regardless of their dependencies.
All packages in Fedora that need Python 2 to build will be removed from Fedora 32 regardless of their dependencies.
Exceptions can be granted by FESCo.
- Name: Miro Hrončok
- Email: <firstname.lastname@example.org> <email@example.com>
- Release notes owner:
- Targeted release: Fedora 32
- Last updated: 2019-09-12
- Tracker bug: #1708725
- Release notes tracker: #338
Python 2 is unsupported upstream since 2020-01-01. Packages dependent on Python 2 are being removed from Fedora for several releases already:
Now, the Python maintainers have decided to pull the plug. The
package and all its subpackages will be retired (read: removed) from Fedora 32 (Rawhide) as soon as Fedora 31 is branched (in fact we'll wait until after the Changes/Python3.8 side tag is merged).
All packages depending on any python2 package will be removed. The removal starts mid November 2019. Broken dependencies will not stop the removals. Packages that Fail to Build From Source and prevent to remove Python 2 subpackages may end up with broken dependencies, in cases where it is not desired, those packages will be retired instead.
The rules also apply to modules built for Fedora 32+.
The package removal will be executed in an automated fashion.
The python27 package
Similarly to existing
etc. packages, a
package will be created.
This package is intended for Python developers who still need to support the legacy version of Python.
This package is intended for users, who still need to use some software depending on the legacy version of Python.
This package is not intended for other Fedora packages to be depended upon.
- it is "flat" - there are no subpackages, everything lives in one package
- there is no debug build (previously available as
- there is no
/usr/bin/python(note: there might be already the case before this change)
- any special backwards compatible Provides are removed (this package is not intended to be depended upon)
The package maintainer is responsible to check the entire dependency chain and they need to request exceptions for the entire list of packages. For example, when seeking exception for the
package, the request should contain
and other dependent packages. (Yes, this is tedious. Maintaining a Python 2 dependent package is a burden.)
The exception request must include a plan for migrating to Python 3.
Any non-essential dependency must be dropped. That includes optional dependencies, test dependencies, optional subpackages etc.
Package that fail to get an exception when the removal starts (see above) will be removed. Their importance for Fedora Release Engineering, Fedora Infrastructure or any other body will not be automagically respected; every package that needs Python 2 needs an exception.
The change owners will send regular reminders to the package owners.
Benefit to Fedora
Python 2 is past upstream End of Life since 2020-01-01. This changes is generally crafted in a way that:
- it leaves Python developers an option to use it in case they still need to support it
- it leaves Fedora users an option to use it in case they still need it to run their (3rd party) software
- it leaves Fedora packagers an option to keep using it (complicated, but possible)
- it removes Python 2 software from Fedora that was only preserved so far by inaction
Using Python 2 is dangerous. While the Fedora Python maintainers will try to fix as many security bugs as possible, without the upstream involvement this will be hard.
Python 2 is deprecated since Fedora 30. This change moves Python 2 from second class citizen to third class citizen.
- Proposal owners:
- Other developers:
- Release engineering: #8306 (a check of an impact with Release Engineering is needed)
- List of deliverables: none
- Policies and guidelines: Python 2 packaging is against the guidelines since Fedora 30. Python 2 packaging guidelines will be removed from Python Appendix (unless the FPC wants to keep them around until F31 EOL).
- Trademark approval: not needed for this Change
The majority of removed packages will be obsoleted and removed on upgrade.
Users needing Python 2 libraries will not find these packaged as RPMs. They may install upstream versions using pip and virtualenv.
How To Test
There will be close to zero Python 2 RPMs in Fedora repos. Users are encouraged to switch to Python 3 and/or use Python 2 virtual environments and pip for development.
Ideally, all programs that use python2 would be switched to use python3. Although we don't expect everything to be switched over, as much as possible should be, so that the ripped remaining python2 set is small as possible.
- Contingency mechanism:
- In case of serious issues, FESCo can issue a general exception for packages that would otherwise prevent Fedora 32 from being composed.
- If someone steps up to maintain Python 2 (including the full ecosystem of packages now in Fedora), they can decide to discontinue removing packages, revert this Change, or come up with another plan. (Note that in this case, current maintainers will most likely orphan many fundamental python2 packages.)
- Contingency deadline: Fedora 32 Beta
- Blocks release? in theory it should not, in practice, it may break the release and hence it will block it until fixed
- Blocks product? all of them?
This page should serve as the documentation.