F23 System Wide Change: Python 3 as Default

Robert Kuska rkuska at redhat.com
Thu Jun 11 09:26:35 UTC 2015


----- Original Message -----
> From: "Zbigniew Jędrzejewski-Szmek" <zbyszek at in.waw.pl>
> To: devel at lists.fedoraproject.org
> Sent: Wednesday, June 10, 2015 10:05:41 PM
> Subject: Re: F23 System Wide Change: Python 3 as Default
> 
> On Wed, Jun 10, 2015 at 08:50:14AM -0400, Jan Kurik wrote:
> > = Proposed System Wide Change: Python 3 as Default =
> > https://fedoraproject.org/wiki/Changes/Python_3_as_Default
> > 
> > Change owner(s):
> > * Slavek Kabrda <bkabrda at redhat dot com>
> > * Matej Stuchlik <mstuchli at redhat dot com>
> > * Miro Hroncok <mhroncok at redhat dot com>
> > * Thomas Spura <tomspur at fedoraproject dot org>
> > * Robert Kuska <rkuska at redhat dot com>
> > 
> > Up until now, Fedora has used Python 2 as the default Python
> > implementation. This change proposes switching to Python 3. The details of
> > the term "switching" are explained thoroughly in the Scope section.
> > 
> > == Detailed Description ==
> > It is currently mature and stable, since it has been under active
> > development for five years
> More than that, I'm sure.
> 
> > == Scope ==
> > The main goal is switching to Python 3 as a default, in which state:
> >     * DNF is the default package manager instead of Yum, which only works
> >     with Python 2
> Does that mean that dnf-3 is going to become the default which is installed
> as /usr/bin/dnf?

Yes

> Will "old" dnf be available as /usr/bin/dnf-2?

This decision is solely in the hands of dnf maintainers.

Looking at current state (f22):

rkuska at deimos ~                                                      [11:03:23] 
> $ rpm -ql dnf | grep bin                                                     
/usr/bin/dnf
                                                                                
rkuska at deimos ~                                                      [11:03:31] 
> $ rpm -ql python-dnf | grep bin                                              
/usr/bin/dnf-2
                                                                                
rkuska at deimos ~                                                      [11:03:35] 
> $ rpm -ql python3-dnf | grep bin                                             
/usr/bin/dnf-3

the answer seems to be yes. 

> 
> > Changes in packaging:
> >     * Change definition of default python interpreter to python3.
> What does that mean?
> 
> >     * Change unversioned python macros to python3 (Possibly do that change
> >     in upstream rpm)
> Hm, I think that this will break hundreds of packages... Not everything has
> been updated to use %{__python2} or %{__python3}, and of those that haven't
> been
> updated, many probably are not ready for switching to python3. I think it
> would be better to avoid a flag day, and simply slowly switch packages
> one by one.

This is already part of packaging guidelines so any package that is not using
versioned macros doesn't comply the guidelines and therefore should be fixed.
So either packagers will fix their packages themselves once they fail to build
during mass rebuild or we (owners of the change) will step in.

> 
> > * All applications that use only a single python version MUST use
> >    python3 (unless they have a good reason not to do so).
> Do you intend to file bugs for all such packages or notify maintainers
> in some other way?

This applies for new reviewed packages and for those who are installed
by default on different target releases (do we have a common name for different 
fedora releases such as LiveDVD, Atomic, Cloud etc?) listed in scope and for these
either already exist or we plan to open bugzilla reports.

> 
> Zbyszek
> 
> 
> --
> devel mailing list
> devel at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/devel
> Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct



--
Robert Kuska
{rkuska}



More information about the devel mailing list