Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: change default to python3 #19626

Closed
wants to merge 2 commits into from
Closed

Python: change default to python3 #19626

wants to merge 2 commits into from

Conversation

FRidh
Copy link
Member

@FRidh FRidh commented Oct 17, 2016

Motivation for this change

#18185

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • OS X
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@FRidh, thanks for your PR! By analyzing the history of the files in this pull request, we identified @NeQuissimus, @peti and @micxjo to be potential reviewers.

@FRidh FRidh added this to the 17.03 milestone Oct 17, 2016
@domenkozar
Copy link
Member

http://hydra.nixos.org/jobset/nixpkgs/python3 builds python packages only, but I guess we should rebuild the whole nixpkgs? I'll change to that.

@domenkozar
Copy link
Member

Done. error: undefined variable ‘pythonPackages’ at /nix/store/2m6xrym9ch7j7j7a0jqsvsazhhp22cnp-git-export/pkgs/development/arduino/ino/default.nix:15:36

@FRidh FRidh force-pushed the python3 branch 2 times, most recently from 217203f to 5b608b9 Compare October 17, 2016 15:56
@FRidh
Copy link
Member Author

FRidh commented Oct 17, 2016

@FRidh FRidh force-pushed the python3 branch 3 times, most recently from 84f9b05 to 9e4df40 Compare October 18, 2016 07:33
@FRidh
Copy link
Member Author

FRidh commented Oct 18, 2016

Failures relative to staging:
http://hydra.nixos.org/eval/1297676?compare=staging#tabs-now-fail

I think I've fixed about half of those by now.

@FRidh
Copy link
Member Author

FRidh commented Oct 18, 2016

latest evaluation
http://hydra.nixos.org/eval/1297698?compare=staging

@domenkozar could we merge this into staging? There are still some important failures, but as far as I can see no more rebuilds. Then on staging we can fix the final issues that prevent merging into master.

@domenkozar
Copy link
Member

Two issues merging this:

  • it compares to staging evaluation that was mostly canceled, so there might be more failures
  • we still have to run all nixos tests before it's merged to staging. It's important to not break everything as that will block others from using staging

@FRidh
Copy link
Member Author

FRidh commented Oct 18, 2016

it compares to staging evaluation that was mostly canceled, so there might be more failures

Indeed, there's a bit more failures http://hydra.nixos.org/eval/1297698?compare=1297372

@FRidh
Copy link
Member Author

FRidh commented Oct 18, 2016

There's also the list of errors to consider. This list will include packages that could not be build because a Python dependency is disabled.
http://hydra.nixos.org/jobset/nixpkgs/python3#tabs-errors

That's a looooong list.

@copumpkin
Copy link
Member

Does the LLVM stuff still work? That's the main thing I care about for Darwin purposes.

@FRidh FRidh force-pushed the python3 branch 4 times, most recently from ee7e7ea to a312b6c Compare October 18, 2016 21:20
@FRidh
Copy link
Member Author

FRidh commented Oct 18, 2016

I've merged into staging everything except the actual switch to Python 3.

@FRidh
Copy link
Member Author

FRidh commented Oct 18, 2016

@copumpkin all llvm except for 3.4 were building fine.

correction: llvm 3.7 needed python 2 because of a bytes - str issue.

@FRidh
Copy link
Member Author

FRidh commented Oct 19, 2016

Some packages are not available for Python 3. Therefore, any package that depends on this one should use Python 2.

@FRidh FRidh force-pushed the python3 branch 2 times, most recently from dad6032 to 92b6b52 Compare October 20, 2016 07:29
@copumpkin
Copy link
Member

I tried merging this into staging and building the darwin stdenv and I didn't notice any difference during the bootstrap. Is LLVM pulling in python2 explicitly?

@FRidh
Copy link
Member Author

FRidh commented Nov 19, 2016

My system now runs on this branch, and I haven't encountered any issues so far. Judging from the tests I think there's only one issue remaining, and that would be fixing kde 4. Aside from that there's a bunch of lesser important packages that need to be fixed but I'll leave that for the maintainers.

@@ -1,7 +1,7 @@
{ stdenv, fetchurl, cmake, libxml2, libxslt, python, sphinx, qt4 }:

stdenv.mkDerivation {
name = "${python.libPrefix}-pyside-apiextractor-0.10.10";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reminder to self: this isn't correct yet.

@FRidh
Copy link
Member Author

FRidh commented Jan 16, 2017

If we want to have Python 3.5 as default some fixes are going to be needed. If I recall correctly Python 3 builds or packages are not yet deterministic. I won't have much time to work on this or Nixpkgs in general the coming months (final phase of PhD).

cc release manager @globin

@globin
Copy link
Member

globin commented Jan 23, 2017

Do you see this being ready for the branch-off at the end of February?

@FRidh
Copy link
Member Author

FRidh commented Jan 23, 2017

@globin unless someone else picks it up, no. I won't have any time to work on this. Migrating the final packages to Python 3 (or letting them remain at 2) shouldn't be too much work I think.

@globin
Copy link
Member

globin commented Jan 23, 2017

I'll include a link to this PR in the timeline announcement, hoping someone will pick this up.

@FRidh FRidh force-pushed the python3 branch 5 times, most recently from e98efc2 to 9fbe535 Compare February 10, 2017 08:45
Even though Python 3 is now the default interpreter, we would like to
have `/bin/python` refer to 2 in case both 2 and 3 are installed in one
profile.

This automatically applies to python27.buildEnv as well since buildEnv
inherits the meta from Python.
@globin globin modified the milestones: 17.09, 17.03 Mar 15, 2017
@FRidh
Copy link
Member Author

FRidh commented Apr 18, 2017

As was discussed on the mailing list some are against simply staging python = python3; and want to replace all occurrences of python with python3. I'm not interested in doing that work so I'm closing this PR.

@FRidh FRidh closed this Apr 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants