Merged
Conversation
Closed
827f0c7 to
7107788
Compare
7107788 to
122835a
Compare
c52331d to
a834bbe
Compare
91c4999 to
54dfd70
Compare
588320d to
dd0c6a0
Compare
dd0c6a0 to
7678816
Compare
7678816 to
28d6334
Compare
ace5ebe to
50c6463
Compare
9908e0f to
5a23161
Compare
fix: version based on pipx fix: subprocess on Windows fix: uv or virtualenv, test fix: windows fix: ignore errors in rmtree (3.8+ should be fine on Windows now) fix: resolve nox path on Windows chore: update for recent linting/typing additions Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
5a23161 to
a6c0524
Compare
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
4503f9b to
c537fe1
Compare
Collaborator
Author
|
It's been exactly three months today, so going to go ahead and merge, we can revert or change if there are any post-merge concerns! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've started #848. This allows you to write a noxfile like this:
Any dependencies, including version ranges and nox, will be checked. If not satisfied, nox will make a new
.nox/_nox_script_modeenvironment, set it up with the above dependencies, and then pass control to the new nox environment. Requires-python is not respected yet, might need #814. That can be added later, not a target for this PR.I've allowed this to be passed via flag and envvar, but envvar always comes first, and overrides the flag. This ensures the second run will never trigger a third run of nox. If someone has other ideas for ways to ensure this, I'm open. Also, the envvar is needed if you request an older nox, since the flag won't be valid in the "inner" run.
--script-mode=freshallows you to enforce a fresh environment.It supports both pip and uv; since this is a new feature, defaulted to uv if available, and fallback on pip.
Maybe should be configurable; currently it's locked on the "default" isI've made it configurable withuv|virtualenv.tool.nox.script-venv-backend/--script-venv-backend/NOX_SCRIPT_VENV_BACKEND.It's a bit less clever on Windows following pipx's example; pipx doesn't use process replacement there; the original PR said it "wasn't reliable" for pipx. Looks like path quoting is not handled by this method, and it doesn't do anything special on Windows. pypa/pipx#531
Note this is available in tox as
requires = ..., but before PEP 723 there wasn't a clean way to do this for nox.Fix #414.