wntrblm / nox

Flexible test automation for Python
https://nox.thea.codes
Apache License 2.0
1.3k stars 148 forks source link

run test session against active python versions #825

Closed gpongelli closed 3 months ago

gpongelli commented 4 months ago

How would this feature be useful?

Hi, thanks for this package, it solves many issues I had with tox.

Many times ago I've developed a package that can be useful while working with nox, it is python-active-versions that gather python's active versions from developers website.

It can be used together with nox in a way like this:

import nox

from python_active_versions.python_active_versions import get_active_python_versions
from typing import List

def _get_active_version(_active_versions: List[dict]) -> List[str]:
    return [_av['version'] for _av in _active_versions]

_python_versions = _get_active_version(get_active_python_versions())

@nox.session(python=_python_versions)
def test_something(session):
    ...

@nox.session(python=_python_versions)
def test_another(session):
    ...

So nox executes test sessions against installed and active (not EOL) python versions; devs have no more need to manually put supported python version array to the session.

Hope this can be useful for other python devs that are using nox.

Thanks.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Anything else?

No response

DiddiLeija commented 3 months ago

Hi! Thanks for sharing, sounds like an interesting approach!

However, this issue format is meant to propose features to the nox package itself, so I'll close this issue. If you would like to meet Nox-interested folks, you can join the Winterbloom Discord server, there's a Nox-specific channel -- https://nox.thea.codes/en/stable/CONTRIBUTING.html#support-questions-and-feature-requests :)