Bug 1664487

Summary: python_provide assumes that python2 subpackages should be default
Product: [Fedora] Fedora Reporter: Eli Young <elyscape>
Component: python-rpm-macrosAssignee: Miro Hrončok <mhroncok>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, j, mcyprian, mhroncok, orion, pviktori
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-23 13:24:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1729593    

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.