- 1 Make /usr/bin/python Python 3
Make /usr/bin/python Python 3
It's 2020 and Python 2 is not supported any more. In the line with https://www.python.org/dev/peps/pep-0394/ PEP 394], /usr/bin/python will point to Python 3 sine Fedora 31 (the release number might change, depending on release schedules of Python and Fedora). All python3-foo packages will provide the python-foo variant and python2-foo will stop providing it.
- Name: Miro Hrončok
- Email: <email@example.com>
- Release notes owner:
- Targeted release: Fedora 31
- Last updated: 2016-12-03
- Tracker bug: <will be assigned by the Wrangler>
According to PEP 394 /usr/bin/python should mean Python 2 up until 2020, now whne it's already 2020, the PEP was changed (TODO check) and /usr/bin/python should mean Python 3. We will change that and together with that we will change our policy about the Python naming.
- python2 and python2-<module> packages provide python and python-<module>
- /usr/bin/python and other unversioned executables from the pythonX package belong to python2 package and are symlinks to /usr/bin/python2 etc.
- Python tools have their unversioned executable in the python2-<tool> package and /usr/bin/<tool> is a symlink to /usr/bin/<tool>-2
State after this change
- python3 and python3-<module> packages provide python and python-<module>
- /usr/bin/python and other unversioned executables from the pythonX package belong to python3 package and are symlinks to /usr/bin/python3 etc.
- Python tools have their unversioned executable in the python3-<tool> package and /usr/bin/<tool> is a symlink to /usr/bin/<tool>-3
Benefit to Fedora
Users will no longer be confused that there is no /usr/bin/python in Fedora by default and will no longer get old legacy Python 2 when installing and running just "python". Python means Python 3 for the outer world and that should be the the same for Fedora.
Also, users that still need Python 2 will be able to get it form the repositories, simply by installing and invoking "python2".
- Proposal owners: Switch %python_provide macro, change python and python3 packages, help *Other developers* with their packages, update documentation (RPM porting guide, Developer Portal)
- Other developers: Make sure your package uses either python2 or python3, not juts python (in dependencies, shebangs, scripts...). If your package is a Python tool, make sure the unversioned executable uses Python 3.
- Release engineering: side-tag
- List of deliverables: TBD
- Policies and guidelines: Fedora Python Packaging Guidelines have to be changed to reflect this change
- Trademark approval: N/A (not needed for this Change)
How To Test
- Install Fedora 29 or 30
- Upgrade it to Fedora 31
- Check if running "python" runs Python 3
- Check if installing python just says python3 is already installed
- Check if critical system components works (dnf, etc.)
- Check if your favorite Python applications work
Fedora would feel more modern. Users will stop reporting bugs like this one.
We need the PEP in question to actually change.
- Contingency mechanism: We should do it in side tag first and drop the side tag if everything goes wrong
- Contingency deadline: TBD
- Blocks release? Yes
- Blocks product? All
See PEP 394 and this page.