PEP or other official document about (mandatory) use of "requires_python" and "classifier" (with Python version) fields? #3816
-
I know two ways to specify the required Python version.
This is redundant. But for example tools like Do you have any source or opinion about it? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Briefly, classifiers are particularly important to specify the upper bound that the package is actually tested to work against, without being a hard cap for the solver like However, this would likely be more on topic for the official Python Packaging Discourse instead, since this is spec/usage advice and not anything specific to the implementation in any one particular backend (like Setuptools). |
Beta Was this translation helpful? Give feedback.
-
They are not mandatory. The only metadata that is mandatory is Remark: I personally think |
Beta Was this translation helpful? Give feedback.
They are not mandatory. The only metadata that is mandatory is
name
(and somehowversion
, but version can bedynamic
). Reference: https://packaging.python.org/en/latest/specifications/declaring-project-metadata/.Remark: I personally think
requires-python
is preferred overclassifiers
because tools are more likely to enforcerequires-python
.