Python3 as default

Robert Kuska rkuska at redhat.com
Mon Apr 20 07:47:58 UTC 2015



----- Original Message -----
> From: "Nick Coghlan" <ncoghlan at gmail.com>
> To: "Fedora Python SIG" <python-devel at lists.fedoraproject.org>
> Sent: Friday, April 17, 2015 7:50:54 AM
> Subject: Re: Python3 as default
> 
> +1 from me on the suggested changes.
> 
> On 15 April 2015 at 02:56, Robert Kuska <rkuska at redhat.com> wrote:
> >
> > *{__python} VS /usr/bin/python CONFUSION*
> > Why is value of {__python} being changed and /usr/bin/python (along with
> > python-foo being python2)
> > is untached? I see this as two different situations or two different point
> > of views.
> >
> > /usr/bin/python is a *user view*, as a user I would expect when I type
> > python that it would fire
> > up python2 interpreter as this is the default behaviour for all(-ArchLinux)
> > distros and also
> > python.org recommendation. Similarly when I type `sudo dnf install
> > python-foo` I would expect
> > to receive python2 version of foo package. This is why we stay with
> > /usr/bin/python pointing
> > to python2 and python-foo to provide python2 version of package. As a user
> > I don't care for macros
> > and their values, they are hidden from me => I am not confused, I get what
> > I expect.
> 
> We discussed the future fate of the /usr/bin/python symlink at the
> language summit (and a little further at the sprints), and it
> currently seems likely that we're going to go down the path of the
> Python Launcher for Windows model, and make "python" refer to a
> configurable shim that:
> 
> 1. Launches an administrator configured Python version by default
> 2. Can be switched to run a different Python via command line options
> 
> This is essentially the rubypick model, but the CLI and configuration
> file format will be defined by CPython upstream rather than by the
> distro.
> 

I like the idea of letting the user to decide whether the /usr/bin/python
should point to python2 or python3, even better, to make it configuarable
for both users and admins of the machine.

Admin choose the default.
User may change it for himself.

(I don't know if it works the same way on Windows)

This of course means that we have to make sure to don't leave any shebang
with /usr/bin/python in fedora packages.

The question is, (with user choice for /usr/bin/python in mind which makes python
to be different interpret per user machine) what should python-foo provides? Should 
we provide python2 package and change it later (or never) to python3 (?) or make 
python-foo a dummy package (containing no files, is it even possible in rpm?) 
and force users (packagers will have to) to use python2-foo python3-foo?

> Cheers,
> Nick.
> 
> --
> Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
> _______________________________________________
> python-devel mailing list
> python-devel at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/python-devel


More information about the python-devel mailing list