From Fedora Project Wiki
 
Line 92: Line 92:
<!-- What work do other developers have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
<!-- What work do other developers have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->


* Release engineering: probably not needed
* Release engineering: side-tag
<!-- Does this feature require coordination with release engineering (e.g. changes to installer image generation or update package delivery)?  Is a mass rebuid required?  If a rel-eng ticket exists, add a link here.  
<!-- Does this feature require coordination with release engineering (e.g. changes to installer image generation or update package delivery)?  Is a mass rebuid required?  If a rel-eng ticket exists, add a link here.  
Please work with releng prior to feature submission, and ensure that someone is on board to do any process development work and testing; don't just assume that a bullet point in a change puts someone else on the hook.-->
Please work with releng prior to feature submission, and ensure that someone is on board to do any process development work and testing; don't just assume that a bullet point in a change puts someone else on the hook.-->

Latest revision as of 13:24, 3 December 2016


Make /usr/bin/python Python 3

Summary

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.


Owner

  • Name: Miro Hrončok
  • Email: <python-maint@redhat.com>
  • Release notes owner:

Current status

  • Targeted release: Fedora 31
  • Last updated: 2016-12-03
  • Tracker bug: <will be assigned by the Wrangler>

Detailed Description

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.

Current state

  • 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".


Scope

  • 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.
  • Policies and guidelines: Fedora Python Packaging Guidelines have to be changed to reflect this change
  • Trademark approval: N/A (not needed for this Change)

Upgrade/compatibility impact

TBD

How To Test

  1. Install Fedora 29 or 30
  2. Upgrade it to Fedora 31
  3. Check if running "python" runs Python 3
  4. Check if installing python just says python3 is already installed
  5. Check if critical system components works (dnf, etc.)
  6. Check if your favorite Python applications work

User Experience

Fedora would feel more modern. Users will stop reporting bugs like this one.

Dependencies

We need the PEP in question to actually change.

Contingency Plan

  • 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

Documentation

See PEP 394 and this page.

Release Notes