F22 System Wide Change: Python 3 Migration Improvements

Jaroslav Reznik jreznik at redhat.com
Mon Feb 2 18:03:57 UTC 2015

= Proposed System Wide Change: Python 3 Migration Improvements =

Change owner(s): Slavek Kabrda <bkabrda at redhat.com>, Matej Stuchlik 
<mstuchli at redhat.com>, Miro Hroncok <mhroncok at redhat.com>

Since Changes/Python_3_as_Default was retargeted for F23 mostly due to 
uncertainty about DNF and Anaconda porting status, this change aims to reflect 
current progress of Python 3 readiness in Fedora and sum up goals for Fedora 

== Detailed Description ==
Python 3 is the next generation of Python programming language. It is 
currently mature and stable, since it has been under active development for 
more than six years - version 3.0 was released in December 2008, current 
latest stable version is 3.4.2 released in October 2014. The main reason to 
switch to Python 3 as the default implementation is that Python 2 is in 
maintenance mode, thus only bugfixes and security fixes are accepted upstream. 
Further reasons are mentioned in the Benefit to Fedora section [1].

Originally, Fedora 22 was supposed to be shipped with Python 3 as Default [2]. 
There was however rising concern about Python 3 readiness of some key 
components - mostly Anaconda and DNF. Due to this fact FESCo decided to 
retarget Python 3 as Default for Fedora 23, hence also stopping mass bug filing 
for rebuilds with Python 3 for Fedora 22. As a result, most packages in Fedora 
22 will still use Python 2 and at this state it's not desirable to pronounce 
Python 3 "the default Python".

Since a massive amount of work has been done towards Python 3 migration, it 
still makes sense to use as much of this effort for Fedora 22 as possible. See 
Scope for overview of changes proposed for Fedora 22 by this Change. 

== Scope ==
Goals of this change are:
* to switch as many packages present on Fedora Workstation LiveCD to Python 3 
(the Workstation LiveCD already ships both Python interpreters, so switching 
more packages to Python 3 won't increase size)
* to make minimal cloud image Python 2 free
* to make Fedora atomic host Python 2 free
Note: this Change intentionally doesn't talk about switching or not switching 
Anaconda and DNF to Python 3. These are left up to broader community consensus 
and don't prevent this change from happening.

There are basically two types of packages that need to undergo the conversion:
* "libraries" - Python extension modules and libraries that provide Python 
bindings - assuming that there is upstream support, these can receive python3- 
subpackage anytime without any damage to Fedora; we can then just utilize this 
subpackage when switching to Python 3 (instead of using current python- 
* "applications" - Packages that build with some sort of embedded Python 
support, like gdb, or Rhythmbox with its plugins. In these cases, it makes no 
sense to do a python3- subpackage, since the whole package would need to be 
duplicated (e.g. python3-gdb). These packages should be built with Python 3 in 
Fedora 22 rawhide as soon as possible.

The packages that should be rebuilt with Python 3 are:
* abrt 
* authconfig https://bugzilla.redhat.com/show_bug.cgi?id=984907
* bind https://bugzilla.redhat.com/show_bug.cgi?id=1186791
* caribou https://bugzilla.redhat.com/show_bug.cgi?id=1186792
* cloud-init https://bugzilla.redhat.com/show_bug.cgi?id=1024357
* environment-modules https://bugzilla.redhat.com/show_bug.cgi?id=1184979
* gdb https://bugzilla.redhat.com/show_bug.cgi?id=1014549
* gettext
* gnome-abrt
* heat-cfntools https://bugzilla.redhat.com/show_bug.cgi?id=1024368
* hplip
* gupnp
* nfs-utils
* pcp
* pidgin
* setroubleshoot https://bugzilla.redhat.com/show_bug.cgi?id=1125209
* sos https://bugzilla.redhat.com/show_bug.cgi?id=1014595
* telepathy-gabble
* totem

This list is provided here because the tracking bug of Python 3 as Default 
contains also packages needed for DNF and Anaconda, which are not essential to 
this effort. These BZs will be attached to a new tracker bug once it's created.

Note that Python packaging guidelines have already been [3] to prefer Python 3 
over Python 2 for newly introduced applications since Fedora 22.

== Contingency Plan ==
* Contingency mechanism: None needed. Packages that will be ready will be 
built with Python 3, the rest will be ported in next release.
* Contingency deadline: Software string freeze
* Blocks release? No

[2] https://fedoraproject.org/wiki/Changes/Python_3_as_Default
devel-announce mailing list
devel-announce at lists.fedoraproject.org

More information about the devel mailing list