-
Notifications
You must be signed in to change notification settings - Fork 932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Remove '<4' from python_requires in packaging guide #850
Conversation
As discussed in https://discuss.python.org/t/use-of-less-than-next-major-version-e-g-4-in-python-requires-setup-py/1066 and other places there can be some side effects of adding `<4` to a library's python_requires. This PR removes it, as requested in the discuss.python question. The section above the lines discussed in the topic that uses compatible release syntax is also removed given that `~=3.3` also enforces `<4`. Additional references of problems known to Matthew for posterity: * Twitter threads: - https://twitter.com/HEPfeickert/status/1362170933658738701 - https://twitter.com/nicholdav/status/1366978826790666240 * GitHub Issues: - python-poetry/poetry#3747
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep in mind, unlike for libraries (where honestly this is still a poor idea for a general library pin), using Requires-Python causes pip to scroll back through history to find the first matching version that does not have a Requires-Python slot that does not include the current Python. This is never correct for a "future" version, but can only be used for the use case it was designed for - dropping a version that you used to support.
For posterity, related to: nedbat/coveragepy#1021 |
As discussed in the discuss.python topic "Use of “less-than next-major-version” (e.g.,
<4
) inpython_requires
(setup.py)" and other places there can be some side effects of adding<4
to a library'spython_requires
. This PR removes it, as requested by @njsmith in the discuss.python topic.The section above the lines discussed in the topic that uses compatible release syntax is also removed given that
~=3.3
also enforces<4
.My apologies in advance if this was already discussed in an Issue and decided against (I didn't see any when I scrolled through) or in a previously closed PR. Please let me know if you'd like me to open an Issue to discuss this PR topic instead.
Tagging @pfmoore and @njsmith as they were the devs in the discuss.python topic and @NickleDave and @henryiii as they might be interested in this as well.