Bug 1664487 - python_provide assumes that python2 subpackages should be default
Summary: python_provide assumes that python2 subpackages should be default
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-rpm-macros
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHONIS3
TreeView+ depends on / blocked
 
Reported: 2019-01-08 23:51 UTC by Eli Young
Modified: 2019-07-23 13:24 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-23 13:24:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Eli Young 2019-01-08 23:51:34 UTC
The Fedora Packaging Guidelines for Python recommends that packages that offer a python3 subpackage use the %python_provide macro to provide python-packagename, as it will appropriately select python2 or python3 based on the version of Fedora[1]. 

Currently in Fedora Rawhide, which corresponds to Fedora 30, Python 2 packages are being removed whenever possible[2]. Additionally, Python 3 was effectively declared to be the default version of Python whenever possible starting in Fedora 22[3]. Despite this, the %python_provide macro still marks the python2 subpackage as the one providing python-packagename, rather than the python3 subpackage[4]. This should be changed at the very least in rawhide.

[1]: https://fedoraproject.org/wiki/Packaging:Python#The_.25python_provide_macro
[2]: https://bugzilla.redhat.com/show_bug.cgi?id=1625773
[3]: https://fedoraproject.org/w/index.php?title=Packaging:Python&oldid=524457#Naming
[4]: https://src.fedoraproject.org/rpms/python-rpm-macros/blob/9b8fac037df29067489914477c388574845cb5e5/f/macros.python#_44

Comment 1 Jason Tibbitts 2019-01-09 01:27:31 UTC
My understanding is that until 'dnf install python' gives python3, it makes no sense for 'dnf install python-*' to give python3 modules.  The distro will at some point switch the meaning of "python" to be python3 instead of python2, but that time has not yet arrived.

Comment 2 Petr Viktorin (pviktori) 2019-01-09 13:04:51 UTC
Python should be spelled as "python3" in package names (or "python2" for the legacy version). For now, the unversioned name "python" is left for backwards compatibility. (Unfortunately, it does look like "a default".)

We'd welcome help adjusting things that still *use* the unversioned name. They're tracked here: https://fedora.portingdb.xyz/namingpolicy/
The list is still too long to break everything on it.

Comment 3 Miro Hrončok 2019-06-18 21:52:16 UTC
This will likely get changed at least in Fedora 32.

Comment 4 Miro Hrončok 2019-06-25 15:07:03 UTC
Actually, we plan to attempt to change this for Fedora 31: https://fedoraproject.org/wiki/Changes/Python_means_Python3

Comment 5 Charalampos Stratakis 2019-07-23 13:24:37 UTC
This was done in rawhide.


Note You need to log in before you can comment on or make changes to this bug.