Skip to content

Support a NOXPYTHON environment variable similar to NOXSESSION #672

@edgarrmondragon

Description

@edgarrmondragon

How would this feature be useful?

It'd save a few keystrokes and would work as a default for --pythons.

Describe the solution you'd like

Check for NOXPYTHON environment variable:

NOXPYTHON=3.11 nox -s tests
NOXPYTHON=3.10,3.11 nox -s tests

While we're at it, it might make sense to also add env vars for --extra-pythons and --force-pythons.

Describe alternatives you've considered

Continue using --pythons, or include the Python version in NOXSESSION, i.e.

NOXSESSION=tests-3.10

but this couples the default session with a Python version

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions