Adjust noxfile to play nice with uvx and tools #217
Merged
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.
Per the official documentation of uv,
uv tool runoruvxpurposely ignore configuration files that select the python version to use.This leads to complications when using nox, not wanting nox as a required dev dependency, and wanting to leverage
uvx noxor usingnoxas an installed tool.Solution: Reapply the
python=Falsearguements for all sessions. For thetestsession which is expected to be run on multiple versions; check for the existance ofUV_PYTHONand add that requirement to the cli flags as needed. For all other sessions, default to the.python-versionpinned interpreter.It was overlooked in #216 that
uvxdoes not follow the configuration files for python versions. In my lack of awareness, I attributed the behavior to a successful solution. Instead, seeing 3.10 being used was nothing more than coincidence that my system's default python is also 3.10.