Re: [Nix-dev] Python 3 as default
> I would also vote for not changing "default" python as it will break stuff. If we can't break stuff we might as well not make any changes at all. There are definitely differences between Python 2 and 3 causing incompatibilities, but incompatibilities also exist between minor versions, so I don't think it is a very strong argument. > but the nix expressions only have the version suffixed attributes to increase explicitness and improve readability. > Plus then we will be ready for python 4 😛 That means explicitly changing parameters and arguments each time we want to upgrade Python (major) version. That's okay with certain packages, but considering how much Python is used throughout Nixpkgs that's just unrealistic. I'm still open to getting rid of the `python` attribute, but I just don't think it is very realistic. If this is the route we want to take, then its very unlikely we will be able to switch to 3.5 as the default for 17.03, or 3.6 for 17.09. On Wed, Feb 15, 2017 at 9:10 PM, Ricardo M. Correia wrote: > > On Tue, Feb 14, 2017 at 2:34 PM, Profpatsch wrote: > >> On 17-02-14 01:18pm, Peter Simons wrote: >> > I hardly ever use nix-shell and I don't want to, to >> > be honest >> >> Completely off-discussion: Why is that? >> Convenience? nix-shell does too many strange things? >> >> Personally I use nix-shell for nearly everything I do >> nowadays because it’s so convenient. >> Even a buildFHSUserEnv is quickly set up for strange software. >> > > Personally, I try to avoid using "nix-shell" as much as possible because I > want "nixos-rebuild switch" to atomically install (and upgrade) all the > software that I usually need, including development packages. > > With nix-shell, I risk having the packages I need become outdated (without > me noticing) and/or become garbage collected (which I do every day > automatically) and unavailable if I lose Internet access (e.g. because I'm > traveling). > > > ___ > nix-dev mailing list > [email protected] > http://lists.science.uu.nl/mailman/listinfo/nix-dev > > ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
On Tue, Feb 14, 2017 at 2:34 PM, Profpatsch wrote: > On 17-02-14 01:18pm, Peter Simons wrote: > > I hardly ever use nix-shell and I don't want to, to > > be honest > > Completely off-discussion: Why is that? > Convenience? nix-shell does too many strange things? > > Personally I use nix-shell for nearly everything I do > nowadays because it’s so convenient. > Even a buildFHSUserEnv is quickly set up for strange software. > Personally, I try to avoid using "nix-shell" as much as possible because I want "nixos-rebuild switch" to atomically install (and upgrade) all the software that I usually need, including development packages. With nix-shell, I risk having the packages I need become outdated (without me noticing) and/or become garbage collected (which I do every day automatically) and unavailable if I lose Internet access (e.g. because I'm traveling). ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
I would also vote for not changing "default" python as it will break stuff. I was going to propose what Eelco already wrote here, just to have explicit sets like python27Packages, python35Packages without any "default". But I would leave symlink as it is for compatibility reasons. 2017-02-14 15:54 GMT+00:00 Kevin Cox : > > > On Feb 14, 2017 07:49, "Freddy Rietdijk" wrote: > > It would two mean things: > >1. alias `python3 to `python` >2. add a symlink that points to the `python` program, as discussed >before in this thread. > > For what it is worth I would prefer that we have a python executable in > the path (if it is "installed"), but the nix expressions only have the > version suffixed attributes to increase explicitness and improve > readability. > > Plus then we will be ready for python 4 😛 > > ___ > nix-dev mailing list > [email protected] > http://lists.science.uu.nl/mailman/listinfo/nix-dev > > -- Tomasz Czyż ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
It would two mean things: 1. alias `python3 to `python` 2. add a symlink that points to the `python` program, as discussed before in this thread. Just removing the `python` attribute is indeed perhaps a better solution than 1). It's explicit, and like you said, it won't silently break people's expressions. If anyone is willing to contribute their sed-fu to do such mass-replacement then I don't see any reason why not. On Tue, Feb 14, 2017 at 4:22 PM, Eelco Dolstra wrote: > Hi, > > On 02/13/2017 10:08 AM, Freddy Rietdijk wrote: > > > As you may be aware the plan is to change to Python 3.5 as default for > 17.03. > > What does it mean to make Python 3 the default? If it's changing the > "python" > attribute or command to alias "python3", I don't really see the advantage > in > doing that. It will just unnecessarily and silently break stuff (like user > scripts that have "#!/usr/bin/env python"). > > We could remove the "python" and "pythonPackages" attributes from Nixpkgs, > forcing use of "python2" or "python3". Then at least people's Nix > expressions > won't change meaning silently. > > -- > Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/ > ___ > nix-dev mailing list > [email protected] > http://lists.science.uu.nl/mailman/listinfo/nix-dev > ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
On Feb 14, 2017 07:49, "Freddy Rietdijk" wrote: It would two mean things: 1. alias `python3 to `python` 2. add a symlink that points to the `python` program, as discussed before in this thread. For what it is worth I would prefer that we have a python executable in the path (if it is "installed"), but the nix expressions only have the version suffixed attributes to increase explicitness and improve readability. Plus then we will be ready for python 4 😛 ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
Hi, On 02/14/2017 04:28 PM, Denis wrote: > The same would have sense for "jdk" and "jre". > There are "jre7" and "jre8" and just "jre" which is "jre7" on darwin > and "jre8" on linux. It is nothing but confusion. Well, Java has better backwards compatibility (though obviously it's bad to have "jre" point to different versions on different platforms). Python 2 and Python 3 are really different languages, so we should not quietly replace one with the other. -- Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/ ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
Hi, On 02/13/2017 10:08 AM, Freddy Rietdijk wrote: > As you may be aware the plan is to change to Python 3.5 as default for 17.03. What does it mean to make Python 3 the default? If it's changing the "python" attribute or command to alias "python3", I don't really see the advantage in doing that. It will just unnecessarily and silently break stuff (like user scripts that have "#!/usr/bin/env python"). We could remove the "python" and "pythonPackages" attributes from Nixpkgs, forcing use of "python2" or "python3". Then at least people's Nix expressions won't change meaning silently. -- Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/ ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
Profpatsch writes: > On 17-02-14 01:18pm, Peter Simons wrote: >> I hardly ever use nix-shell and I don't want to, to >> be honest > > Completely off-discussion: Why is that? > Convenience? nix-shell does too many strange things? > > Personally I use nix-shell for nearly everything I do > nowadays because it’s so convenient. > Even a buildFHSUserEnv is quickly set up for strange software. I do the same, and I never want to work on a project without it. No more incompatible versions between project-A needs foo-1.x and project-B needs foo-2.x. And in addition to using `shell.nix` + `nix-shell` I add `direnv` which automatically applies the shell environments to the current shell when `cd`ing into a directory with a `shell.nix` (or some subdirectory.) signature.asc Description: PGP signature ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
Hi, from this and some of the discussion above I see that the situation in NixOS may be a little different to most other distros. I agree that you probably don't want to have to patch all shebangs manually, but making python2 take priority over python3 in the case of a collision seems like a good solution. Anyway I really just wanted to raise the point for discussion, having done that I can go back to lurking on this list! :) Thanks, Richard On Tue, Feb 14, 2017 at 01:17:07PM +0100, Freddy Rietdijk wrote: > 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 > 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 < > > [email protected] > > > > 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 > > > > [email protected] > > > > http://lists.science.uu.nl/mailman/listinfo/nix-dev > > > > > > ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
Hi At some point, the migration will have to be done. According to PEP373[1], python2 will not be maintained after 2020. Therefore, we have a 3 year window to do this change, and I do not think we should wait the last moment. There will be difficulties for the users when this change will be done. I have no doubt about that. I do not know if there will be a `good' moment to do it. As far as I know, the main distros still use python2 (except for arch) and I do not know what are their schedules for such migration. Personally, I have no objection to use python3 as default for 17.03 (and I will continue to rely on python2 for some time, but this will be a good motivation to migrate our legacy code bases!). Lancelot. On 14/02/2017 14:05, Freddy Rietdijk wrote: > > 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. > > [1] https://www.python.org/dev/peps/pep-0373/ ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
On 17-02-14 01:18pm, Peter Simons wrote: > I hardly ever use nix-shell and I don't want to, to > be honest Completely off-discussion: Why is that? Convenience? nix-shell does too many strange things? Personally I use nix-shell for nearly everything I do nowadays because it’s so convenient. Even a buildFHSUserEnv is quickly set up for strange software. -- Proudly written in Mutt with Vim on NixOS. Q: Why is this email five sentences or less? A: http://five.sentenc.es May take up to five days to read your message. If it’s urgent, call me. ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
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 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
> [email protected]
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
___
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
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 [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
Hi Moritz, > You almost never have python installed globally. I absolutely do. I have both python 2 and 3 in my ~/.nix-profile and I have all kinds of scripts that run "/usr/bin/env python" to find their interpreter. > All packaged programs refer to one *specific* instance of python of > their choosing and it's only availale for themself, not anywhere > else. This is true for builds running inside of Nix, but its oftentimes false for scripts that users run outside of Nix, e.g. in their shell. > Also note that it's generally discouraged to "globally" install a > package for development needs. Instead of globally installing > python3, firefox and gdb you write a `shell.nix` file in the project > directory. I'm not sure what you mean by "globally discouraged", but I certainly don't buy into that. I hardly ever use nix-shell and I don't want to, to be honest, and I'd respond rather angrily to attempts from other people to impose their preferred development style onto me. Best regards, Peter ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
Peter, could you explain how it broke your setup? On Tue, Feb 14, 2017 at 1:14 PM, Peter Simons wrote: > Hi Richard, > > > 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. > > I, too, wonder why we sym-link "python" to "python3". I'm not sure what > the benefits are, but this change certainly broke my setup, so I am well > aware of the disadvantages. > > Best regards, > Peter > > ___ > nix-dev mailing list > [email protected] > http://lists.science.uu.nl/mailman/listinfo/nix-dev > ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
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 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 < > [email protected] > > > 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 > > > [email protected] > > > http://lists.science.uu.nl/mailman/listinfo/nix-dev > > > > ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
Hi Richard, > 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. I, too, wonder why we sym-link "python" to "python3". I'm not sure what the benefits are, but this change certainly broke my setup, so I am well aware of the disadvantages. Best regards, Peter ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
Hey Richard, Richard Ipsum writes: > On Tue, Feb 14, 2017 at 11:29:32AM +0100, Freddy Rietdijk wrote: > 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. Please note that the situation in NixOS is a bit different to other distributions. You almost never have python installed globally. All packaged programs refer to one *specific* instance of python of their choosing and it's only availale for themself, not anywhere else. For example, if you install program A which depends on python3, and another program B which depends on python2, they will happily work, but your system *won't* have neither `python2` nor `python3` nor `python` in PATH. The only situation that will change is if a package depends on (or a user installs) "python" instead of either "python3" or "python2". This is then easily fixed by choosing the correct one. Also note that it's generally discouraged to "globally" install a package for development needs. Instead of globally installing python3, firefox and gdb you write a `shell.nix` file in the project directory, run `nix-shell`, and you will get dropped into a shell with the mentioned packages available, *without* having to install anything of it in a global. Other packages (and even your whole system outside that shell) is unaffected. signature.asc Description: PGP signature ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
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 > 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 > > [email protected] > > http://lists.science.uu.nl/mailman/listinfo/nix-dev > > ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
Hi Richard, Thanks for sharing the PEP. Actually, we, or at least I, chose to ignore that PEP, and so we do symlink. The PEP describes what distributions should do > for the time being, all distributions should ensure that python refers to the same target as python2. > The more general python command should be installed whenever any version of Python 2 is installed and should invoke the same version of Python as the python2 command and what script maintainers should do > in preparation for an eventual change in the default version of Python, Python 2 only scripts should either be updated to be source compatible with Python 3 or else to use python2 in the shebang line. We have a lot of packages that are compatible with both Python 2 and 3. The PEP says about such case > One exception to this is scripts that are deliberately written to be source compatible with both Python 2.x and 3.x. Such scripts may continue to use python on their shebang line without affecting their portability. So now we have `python2` for Python 2 only, `python3` for Python3 only, `python` for packages that support only Python 2, or both 2 and 3. The PEP however doesn't provide any method for distributions that already would like to make the switch to Python 3, which is the reason this PEP came to being > however, end users should be aware that python refers to python3 on at least Arch Linux (that change is what prompted the creation of this PEP), so python should be used in the shebang line only for scripts that are source compatible with both Python 2 and 3. Freddy On Tue, Feb 14, 2017 at 10:40 AM, Richard Ipsum 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 > [email protected] > http://lists.science.uu.nl/mailman/listinfo/nix-dev > ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
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 [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
The branch with fixes for reproducible builds can be found at https://github.com/NixOS/nixpkgs/pull/22585. Note that neither the build of the 2.7 nor the 3.5 interpreter is reproducible afterwards. In the case of the 2.7 there's 4 files that just refuse to use the fixed timestamp in their bytecode, and in case of 3.5 all timestamps are deterministic, but code using sets is not. On Mon, Feb 13, 2017 at 10:34 AM, Jörg Thalheim wrote: > No objections from my side. Do you have a public WIP branch of your > commits to make python 3 reproducible? > > > On 2017-02-13 10:08, 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 > > > > > > ___ > > nix-dev mailing list > > [email protected] > > http://lists.science.uu.nl/mailman/listinfo/nix-dev > > ___ > nix-dev mailing list > [email protected] > http://lists.science.uu.nl/mailman/listinfo/nix-dev > ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
No objections from my side. Do you have a public WIP branch of your commits to make python 3 reproducible? On 2017-02-13 10:08, 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 > > > ___ > nix-dev mailing list > [email protected] > http://lists.science.uu.nl/mailman/listinfo/nix-dev ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Python 3 as default
On 17-02-13 10:08am, Freddy Rietdijk wrote: > In any case, I would like to merge this as soon as possible. Any objections? +1 go for it; Good work! progress is breakage is progress \o/ -- Proudly written in Mutt with Vim on NixOS. Q: Why is this email five sentences or less? A: http://five.sentenc.es May take up to five days to read your message. If it’s urgent, call me. ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] Python 3 as default
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 ___ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
