Skip to content
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

Add conversion methods for requires-python formats #2377

Merged
merged 3 commits into from
Jun 18, 2018

Conversation

techalchemy
Copy link
Member

if c.requires_python:
# Old specifications had people setting this to single digits
# which is effectively the same as '>=digit,<digit+1'
if len(c.requires_python) == 1 and c.requires_python.isdigit():
Copy link
Member

@uranusjr uranusjr Jun 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The len(c.requires_python) ==1 part looks redundant to me, just isdigit() is enough. It does not matter practically, but if Python ever gets to 10.0 we probably want to support that as well.

- Handle single-digit un-specified requires-python format
- `Requires-Python: 3` should be functionally equivalent to `>=3,<4`
- Fixes #2343

Signed-off-by: Dan Ryan <dan@danryan.co>
Signed-off-by: Dan Ryan <dan@danryan.co>
@techalchemy techalchemy merged commit 9195d3a into master Jun 18, 2018
@techalchemy techalchemy deleted the 2343-requires-python branch June 18, 2018 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants