From Fedora Project Wiki

< Changes

Revision as of 15:37, 23 June 2017 by Churchyard (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Python Naming

Use the "python2-" or "python3-" prefix in package names.

Summary

Currently, in Fedora package names, "python" without a version number generally means Python 2. We would like to make it mean Python 3, but to make that switch, we first need to make sure nothing uses unqualified "python".

Owner

Current status

Detailed Description

Fedora Plan

Current situation ("correct" means "follows current packaging guidelines"):

  • correct package supporting Python 2 and 3 builds these binary RPMs:
    • python2-foo (provides python-foo as a virtual provide via %python_provides)
    • python3-foo (uses %python_provides, which is currently no-op)
  • "misnamed" package supporting py2/3 builds these:
    • python-foo (the py2 version; may provide python2-foo virtually, usually doesn't)
    • python3-foo
  • correct py2-only packages are named:
    • python2-foo (provides python-foo as a virtual provide via %python_provides)
  • correct py3-only packages are named:
    • python3-foo (uses %python_provides, which is currently no-op)
  • "misnamed" py2-only package might be named:
    • python-foo, or
    • pyfoo, or
    • foo-python, etc.
  • there are (close to) no "misnamed" py3-only packages

Transition Steps

1) Use python2- instead of python- everywhere

  • ensure that all "python-foo" names are solely virtual provides declarations, with the actual RPMs themselves being called "python2-foo"

2) Change the following:

  • switch %python_provides to provide python-foo from python3-foo instead of python2-foo
  • switch /usr/bin/python to point to /usr/bin/python3
    • also propose some changes to the upstream guidance in PEP 394

3) Orphan python2


Benefit to Fedora

This change simplifies transition to Python 3, when the upstream support for Python 2 ends.

Scope

  • Proposal owners:

Feature owners have to communicate the idea to the packagers and provide all the detailed information. They may step in to fix the packages.

  • Other developers:

Package maintainers are to fix the packages they maintain with the information provided.

  • Policies and guidelines:
    • Using python2/python3 instead of python in binary RPM package name guidelines, fpc
    • Using python2/python3 instead of python in (Build)Requires guidelines, fpc

Upgrade/compatibility impact

N/A (not a System Wide Change)

How To Test

N/A (not a System Wide Change)

User Experience

N/A (not a System Wide Change)

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