pypa / twine

Utilities for interacting with PyPI
https://twine.readthedocs.io/
Apache License 2.0
1.61k stars 308 forks source link

Emit a warning in `twine check` when `Requires-Python` is unset #854

Open webknjaz opened 2 years ago

webknjaz commented 2 years ago

Your Environment

N/A

The Issue

While filing an issue about a missing python_requires in yet another project (https://github.com/joeyespo/pytest-watch/issues/125) I suddenly realized that I've filed a few related feature requests in Twine already but when I've checked them, I saw that I never asked to validate its presence (I only asked to compare it with the wheel tags @ https://github.com/pypa/twine/issues/739). So I thought I'd record another possibly useful check to be added.

Steps to Reproduce

N/A

bhrutledge commented 2 years ago

@webknjaz Thanks for the suggestion. Once again, I think this is similar to #430, which is blocked on https://github.com/pypa/packaging/issues/147. However, I have an initial proposal for an alternative approach in https://github.com/pypa/twine/issues/848; I'd appreciate your feedback.

webknjaz commented 2 years ago

It is somewhat similar to the blocked issue but the difference is that this kind of check is not something that the packaging ecosystem is enforcing currently — people can upload dists without Requires-Python, it's not illegal. And the proposed improvement would need to be added on the twine side, not to packaging or wherever the shared code would end up.