Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: add helper to get the Python listing#877

Merged
henryiii merged 3 commits into
wntrblm:mainfrom
henryiii:henryiii/feat/python_list
Oct 29, 2024
Merged

feat: add helper to get the Python listing#877
henryiii merged 3 commits into
wntrblm:mainfrom
henryiii:henryiii/feat/python_list

Conversation

@henryiii

Copy link
Copy Markdown
Collaborator

Close #855.

@henryiii henryiii mentioned this pull request Oct 28, 2024
Comment thread nox/project.py Outdated

@theacodes theacodes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good, just some nitpicks about naming

Comment thread docs/config.rst Outdated
Comment thread nox/project.py Outdated
@cjolowicz

Copy link
Copy Markdown
Collaborator

I was surprised that max_version determines from where we read the Python versions.

@henryiii

Copy link
Copy Markdown
Collaborator Author

The idea is that you would have to guess the upper bound ( https://discuss.python.org/t/requires-python-upper-limits/12663), so one method (classifiers) doesn't have an upper bound, and the other requires it. Though it could be split if you have good ideas for names.

@cjolowicz

Copy link
Copy Markdown
Collaborator

Makes sense. Another approach would be to always look at Trove classifiers first, and fall back to requires_python if no classifiers are found. The max_version parameter would then just do what it says on the tin: apply an upper bound. (If it's not specified and we can't determine the upper bound from pyproject.toml, we could either bail out or apply our notion of what Python's current version is.) I don't feel strongly about this, though. Happy for this to go in 👍

@henryiii

Copy link
Copy Markdown
Collaborator Author

That's exactly what I originally tried, actually, but then I would have had to implement filtering, and why would you ever want to filter the classifiers using this parameter? What would be more likely to happen is someone would forget to update this bound when adding the classifier. Also, having it be "auto" means you'd have to pick what to do if classifiers and requires-python didn't match.

@henryiii henryiii merged commit 040a93c into wntrblm:main Oct 29, 2024
@henryiii henryiii deleted the henryiii/feat/python_list branch October 29, 2024 20:40
@ews-ffarella

Copy link
Copy Markdown

Hi!
Would that work with Programming Language :: Python :: 3.13t.
Or is this a bad classifiers?

@henryiii

Copy link
Copy Markdown
Collaborator Author

That's not a valid classifier. All valid classifiers are here: https://pypi.org/classifiers/

And the plan would be to add something like pypa/trove-classifiers#195, not a 3.13t classifier.

@henryiii

Copy link
Copy Markdown
Collaborator Author

You can add to this list or process it, though. Including adding PyPy, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Reading Python classifiers from pyproject.toml

4 participants