-
-
Notifications
You must be signed in to change notification settings - Fork 167
Add --download-python python option #989
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
base: main
Are you sure you want to change the base?
Conversation
Adding a --download-python / NOX_DOWNLOAD_PYTHON option to control the behavior of uv installing python, and introducing nox-installed pythons via pbs-installer for venv/virtualenv backends The options are "auto" (default), "always" and "never". - "auto" will first check for a pre-existing installation, and fall back to installing with pbs-installer (or uv in uv venv_backends) - "always" will ignore system pythons and always try to install - "never" will only use pre-existing python installs
@ dependencies, i'm not sure if to add the pbs-installer as an optional and have the whole behavior also depend on that, or if to add it by default |
I'm also unsure about what to do with conda environments, right now they behave like if it was set to "always" and probably doesn't make sense to change it, but it'd be weird the option doesn't apply to them |
no idea why this is producing an ungodly amount of logs, I haven't been able to reproduce the CI errors both on ubuntu & macos, pbs_installer fails in ubuntu when trying to install python 3.7, but it does not look anything like in ci :/ |
I was just mentioning this here at SciPy, thanks! :) We have an issue with logs where it dumps logging closed messages. It's test specific, I think, possibly due to nox running nox. We've never managed to hunt down the root cause. |
@henryiii do you think we should skip conda for this completely or try to have this toggle also control it? looks like it has always had its own separate behavior so i'm not sure |
5398308
to
f6686c8
Compare
I think conda already always installs Python, and it is isolated, so I think it makes sense to only have this affect PyPI. |
Otherwise it fails to collect tests due to the import
@henryiii i think this is ready to review now |
Adding a --download-python / NOX_DOWNLOAD_PYTHON option to control the behavior of uv installing python, and introducing nox-installed pythons via pbs-installer for venv/virtualenv backends
The options are "auto" (default), "always" and "never".
this was discussed here #842 (comment) but i didnt have time until now, also this issue #944
I am not super confident this is a good idea in the end or not, the default "auto" behavior might be surprising if you use venv/virtualenv backend (could be considered breaking in some cases) like it happened when uv started installing python if missing and people did not expect it
and there is still an issue with windows that this would not fix but might help having the opt out #986
still todo:
script-mode test breaks- locally, works on ci?coveragedocumentationa bunch more broken tests on ciwindows install paths are not handled correctly