Adjust noxfile to play nice with uvx and tools #217
Merged
+19
−18
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 run
oruvx
purposely 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 nox
or usingnox
as an installed tool.Solution: Reapply the
python=False
arguements for all sessions. For thetest
session which is expected to be run on multiple versions; check for the existance ofUV_PYTHON
and add that requirement to the cli flags as needed. For all other sessions, default to the.python-version
pinned interpreter.It was overlooked in #216 that
uvx
does 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.