You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think if we want a feature like this (and I like the idea behind the feature!) we'd be better off to expose a way to add the Requires-Python metadata in setuptools so that A) It gets exposed in PyPI and B) it's now in the metadata and pip can read that and act on it. Using that, we could even get a bit more strict in how this is implemented and bail out if we attempt to install something with a Requires-Python that doesn't match (probably without some sort of --force flag).
Instead, I think we need to use a different (new) field. It's possible that Requires-Python would work, although in principle that's mandatory according to Metadata 1.2, and yet as far as I know is rarely if ever used at the moment due to lack of tool support.
Some questions:
Would the field be mandatory? If not, how would we encourage projects to add it? What's the benefit for the project to do so? The most obvious benefit would be to have a way of flagging "not supported on the following older versions of Python" so maybe an Incompatible-Python entry would be better?
Realistically, if it's a new field, will projects use it? There's a history of projects only providing the bare minimum of metadata - as I noted, Requires-Python is technically mandatory, but in practice not used.
I guess the real question is, are projects asking for this capability? While I like the idea in the abstract, if the users don't care, is it going to be worthwhile to add?
The text was updated successfully, but these errors were encountered:
As defined in https://www.python.org/dev/peps/pep-0345/#requires-python
As explained in #3640 by @dstufft:
And a few questions of @pfmoore:
The text was updated successfully, but these errors were encountered: