How would this feature be useful?
If called with max_version=None, python_versions returns a list of versions read from the Trove classifiers. I propose to sort that list before returning it, so that the oldest supported Python version is python_versions()[0], and the most recent one python_versions()[-1].
Describe the solution you'd like
For instance:
from packaging.version import Version
then this line
becomes
return sorted(from_classifiers, key=Version)
Describe alternatives you've considered
Of course, any sane pyproject.toml will have the classifiers already sorted, but should we rely on common sense?
Anything else?
I can prepare a pull request.
How would this feature be useful?
If called with
max_version=None,python_versionsreturns a list of versions read from the Trove classifiers. I propose to sort that list before returning it, so that the oldest supported Python version ispython_versions()[0], and the most recent onepython_versions()[-1].Describe the solution you'd like
For instance:
then this line
nox/nox/project.py
Line 124 in 5a90136
becomes
Describe alternatives you've considered
Of course, any sane
pyproject.tomlwill have the classifiers already sorted, but should we rely on common sense?Anything else?
I can prepare a pull request.