Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Reject packages without a Requires-Python #3889
A problem I've come across many times now is that a package will drop support for an old version and they'll even add a
Since there is no good reason to upload a package without explicitly specifying a
My recommendation for migrating to the "always throw an error" version:
I think we could swap the order of 2 and 3 pretty easily - I'm guessing that updating the upload tools would be easier to do which is why I put them in this order, but 2 could be implemented in terms of 3.
In terms of time frame, I don't know how aggressive you (the Warehouse team) want to be. I think the first 3 can happen as soon as an implementation is available. It's probably a big ask to have all package maintainers switch over in a relatively short period of time, but I think a long deprecation period will be harmful given that it's likely a large number of packages are going to start dropping support for Python 2 soon, which will probably cause a ton of headaches if people aren't including
One use case would be a package that is compatible (or at least, thinks it's compatible) with all versions of Python. What should this field be for those packages, something like
I don't believe displaying a warning for a successful upload is possible at the moment without making changes to
Worth mentioning that #726 might help with this a bit, because maintainers would be able to verify that the
Hm. That's a bit of a problem, because half the issue here is that people tend to install
Other possible options:
If #726 is happening soon, option 4 could be implemented as "if you upload and it doesn't have
It seems that the other half of this issue is "how can we make sure users update setuptools/twine more often?" - which would help for more than just this case.
Regarding users already on older broken versions - less disruptive options (vs brownouts/blocking) might be: