[Nix-dev] Python 3 as default

Freddy Rietdijk freddyrietdijk at fridh.nl
Tue Feb 14 13:17:07 CET 2017


Sure. As I said the PEP doesn't provide any method for distributions that
would already like to make the switch. In an ideal scenario all developers
would update their requirements/shebangs. That just doesn't happen.

What we perhaps ought to do is instead fix all those shebangs ourselves,
before we run `patchShebang/wrapPythonPrograms`. Considering the amount of
(boring) work that takes I don't see anyone stepping up doing that.
Therefore, symlinking `python` *also* to `python3` is a pragmatic solution.

As Moritz described, we already pass a specific interpreter as a buildInput
to a package. Therefore, there shouldn't be any issues with our programs.
The only issue that could arise is when one installs both interpreters in
one profile. In that case a collision occurs. Maybe we should set a
priority here so that in that case `python` will refer to `python2`.













On Tue, Feb 14, 2017 at 12:11 PM, Richard Ipsum <richardipsum at fastmail.co.uk
> wrote:

> On Tue, Feb 14, 2017 at 11:29:32AM +0100, Freddy Rietdijk wrote:
> > Hi Richard,
> >
> > Thanks for sharing the PEP.
> >
> > Actually, we, or at least I, chose to ignore that PEP, and so we do
> > symlink.
> >
>
> Out of interest can I ask what the rationale for that decision is?
>
> I'd like to try to persuade you not to symlink python to python3,
> because doing so potentially breaks existing python2 programs.
>
> But since I'm not an active contributor to this project it's not my place
> to argue here really. :)
>
> Thanks,
> Richard
>
> [snip]
> >
> >
> > On Tue, Feb 14, 2017 at 10:40 AM, Richard Ipsum <
> richardipsum at fastmail.co.uk
> > > wrote:
> >
> > > On Mon, Feb 13, 2017 at 10:08:07AM +0100, Freddy Rietdijk wrote:
> > > > Hi,
> > > >
> > > > As you may be aware the plan is to change to Python 3.5 as default
> for
> > > > 17.03. There were a couple of things that had to be done, and I think
> > > we're
> > > > ready now to make the change. Packages that require Python 2 are now
> > > pinned
> > > > to do so.
> > > >
> > > > Now, obviously I haven't been able to test all packages myself, but
> > > judging
> > > > from what Hydra reports and from working from the `python3` branch I
> > > don't
> > > > expect any major issues.
> > > >
> > > > The Python 2.7 interpreter had quite some patches, among one to make
> the
> > > > interpreter and Python packages more deterministic. I say more,
> because
> > > > they're not fully deterministic yet. I have some patches lining up
> for
> > > the
> > > > 3.5 interpreter to improvement determinism there as well.
> > > >
> > > > In any case, I would like to merge this as soon as possible. Any
> > > objections?
> > > >
> > > > Freddy
> > >
> > > Hi, I'm not really an active contributor here but I follow NixOS
> because
> > > I think it's a really cool project.
> > >
> > > Am I to understand that NixOS is considering replacing the python2
> > > interpreter with the python3 interpreter, as arch did?
> > >
> > > If that's the case it may be worth considering this pep[1] first.
> > >
> > > If I've misunderstood and there's no intention to symlink 'python' to
> > > 'python3'
> > > then please ignore this. :)
> > >
> > > [1]: http://legacy.python.org/dev/peps/pep-0394/#id5
> > > _______________________________________________
> > > nix-dev mailing list
> > > nix-dev at lists.science.uu.nl
> > > http://lists.science.uu.nl/mailman/listinfo/nix-dev
> > >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20170214/826ac06b/attachment-0001.html>


More information about the nix-dev mailing list