[Nix-dev] Python 3 as default

Freddy Rietdijk freddyrietdijk at fridh.nl
Tue Feb 14 14:05:43 CET 2017


Peter, that issue we can fix by setting the priority for Python 2 higher.
That should also be done in `python.buildEnv`.

So aside from symlinking, there are I think two other methods. One, fixing
all the shebangs ourselves. Two, modify `patchShebangs` to have an
exception for Python so it will rewrite to whatever `python{X}` is on PATH.
The first option is likely what we ought to do, and the second option won't
happen.

As to your question what the advantages are. Well, aside from the fact that
upstream wants everyone to move away from Python 2, there aren't any,
really. It makes sense for them, they don't want to support old code. Sure,
the Python 3 interpreter can be faster, but then again, the closure is
somewhat bigger. Furthermore, there's a good chance you need now both 2 and
3 on your system. If you want to develop with 3, you already can (and
should), so there isn't any advantage there either.

So when you just want to have your system with your programs and services,
there aren't any real advantages. But for those developing and maintaining
Python packages there definitely are: not having to keep supporting both 2
and 3 because users/distro's don't want to change.


On Tue, Feb 14, 2017 at 1:25 PM, Peter Simons <simons at nospf.cryp.to> wrote:

> Hi Freddy,
>
>  > Peter, could you explain how it broke your setup?
>
> I have plenty of scripts that run "python" expecting to get python2.
>
> I can fix those scripts, of course. I probably should, and I will.
> Still, from a user's point of view, the experience of them suddenly
> misbehaving was not a nice one. Especially since it's not quite
> obviously to me what the *benefits* that change are.
>
> Best regards,
> Peter
>
> _______________________________________________
> 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/f7660632/attachment-0001.html>


More information about the nix-dev mailing list