> I'd be happy to help with the process of mass-renaming, if somebody provided a list of packages wanting 2 or 3, however I suspect the real work is in determining those package sets. So, if a query-replace for `pkgs.python` -> `pkgs.python2` / `pkgs.python3` within nixpkgs would cause so much trouble, how would a rename in `all-packages.nix` fare any better? Are we ready to throw the switch yet?
All the packages that explicitly need Python 2 are already pinned to use Python 2. That was a matter of converting, testing, and moving on. About 150 packages were pinned to `python2`. That is why a `python = python3` won't break anything (or nearly nothing) in Nixpkgs anymore. Explicitly pinning to `python3` means converting every expression that has `python` to `python3`. No breakage should occur anymore, except when one makes a mistake in converting expressions only partially. There are about 1000 packages that need to be converted. The best method I can think of is searching for all the files that contain `python` without leading and trailing alphanumerical characters. Those can typically be converted to `python3`. Exceptions are `pkgs/top-level/python-packages.nix`, `pkgs/development/interpreters/python`, `pkgs/development/python-modules/*` and when the `python` argument is overriden in, say, `all-packages.nix`. Another exception could be `python = python3.withPackages(...)` but I think that is rare. On Fri, Feb 24, 2017 at 4:59 AM, Herwig Hochleitner <[email protected]> wrote: > And a copy for the list as well + a one person applause for our > friend, reply-all. > > ---------- Forwarded message ---------- > From: Herwig Hochleitner <[email protected]> > Date: 2017-02-24 4:54 GMT+01:00 > Subject: Re: [Nix-dev] Python 3 as default > To: Freddy Rietdijk <[email protected]> > > > First off, for context: I'm very grateful for your work to get our > python stuff over to python3. > > I also support python3 providing `/bin/python`, _if_ we ensure that > python2's `/bin/python` takes precedence in all collisions (right > until python2's EOL). I think the PEP's symlinking guideline doesn't > directly apply here, since our transitive dependencies don't collide > (horray!). > > I'm against changing pkgs.python to mean python3, though. Let me break > down why: > > 2017-02-22 16:32 GMT+01:00 Freddy Rietdijk <[email protected]>: > > > > > > If we can't break stuff we might as well not make any changes at all. > > > I see your point, but I'd like to point out that additive changes are > less cumbersome than breaking changes, and explicit breakage is less > cumbersome than implicit breakage. > > > the fact that upstream wants everyone to move away from Python 2 > > to be fair, upstream has been wanting that for a decade > > > > > incompatibilities also exist between minor versions > > > i think users are customarily expected to keep up with point releases. > > > explicitly changing parameters and arguments ... considering how much > Python is used throughout Nixpkgs that's just unrealistic. > > > > I'm still open to getting rid of the `python` attribute, ... 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, > > > I'd be happy to help with the process of mass-renaming, if somebody > provided a list of packages wanting 2 or 3, however I suspect the real > work is in determining those package sets. > So, if a query-replace for `pkgs.python` -> `pkgs.python2` / > `pkgs.python3` within nixpkgs would cause so much trouble, how would a > rename in `all-packages.nix` fare any better? Are we ready to throw > the switch yet? > > > or 3.6 for 17.09. > > > Are there python projects, stuck at 3.5, as well? > > kind regards > _______________________________________________ > 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
