Skip to content

Conversation

Preocts
Copy link
Owner

@Preocts Preocts commented Aug 13, 2025

This change reverts the use of python=False in all nox sessions.
Sessions for tests, linting, and formatting will use nox virtual
environments. In these sessions the location of the virtual environment
will be passed to uv run and uv sync. This means uv will use the
python version that nox is executed with.

This change is needed because nox correctly masks all environment
variables when starting a session.run or session.run_install. This
is ideal to maintain repeatable behavior. This is not ideal when
attempting to use UV_PYTHON to control which version is being run.

Enforcing that uv use the python version that nox is executed with is
the least surprising behavior. Even if this ignores the
.python-version file in the repo.

This change reverts the use of `python=False` in all nox sessions.
Sessions for tests, linting, and formatting will use nox virtual
environments. In these sessions the location of the virtual environment
will be passed to `uv run` and `uv sync`. This means uv will use the
python version that nox is executed with.

This change is needed because nox correctly masks all environment
variables when starting a `session.run` or `session.run_install`. This
is ideal to maintain repeatable behavior. This is not ideal when
attempting to use `UV_PYTHON` to control which version is being run.

Enforcing that uv use the python version that nox is executed with is
the least surprising behavior. Even if this ignores the
`.python-version` file in the repo.
@Preocts Preocts changed the base branch from main to pre-commit-ci-update-config August 13, 2025 03:35
@Preocts Preocts changed the base branch from pre-commit-ci-update-config to main August 13, 2025 03:36
@Preocts Preocts changed the title debug info Pass python version to uv sync and run Aug 13, 2025
@Preocts Preocts self-assigned this Aug 13, 2025
@Preocts Preocts marked this pull request as ready for review August 13, 2025 03:36
@Preocts Preocts merged commit ae4dd5f into main Aug 13, 2025
8 checks passed
@Preocts Preocts deleted the gha branch August 13, 2025 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant