Skip to content

Requires-Python error message should sort versions numerically, not alphabetically #13394

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

Merged
merged 6 commits into from
May 17, 2025

Conversation

qraqras
Copy link
Contributor

@qraqras qraqras commented May 14, 2025

Implements #13367

Requires-Python is str, so I converted it to a list of Versions and sorted it.

@notatallshaw
Copy link
Member

Remove changes to the vendored code, it doesn't look relevant, we don't change that code directly in pip it's changed in the upstream package, and the changes you are making are violating the spec (PEP 440).

@qraqras qraqras force-pushed the dev_issue_13367 branch from 51fbca7 to de0d97e Compare May 14, 2025 14:23
@uranusjr uranusjr changed the title Requires-Python error message should not sort versions numerically, not alphabetically Requires-Python error message should sort versions numerically, not alphabetically May 15, 2025
@uranusjr
Copy link
Member

pre-commit.ci autofix

Copy link
Member

@notatallshaw notatallshaw left a comment

Choose a reason for hiding this comment

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

I would have used a lambda rather than an inline function, but that's mostly a stylistic choice, no objections apart from updating the news item.

@uranusjr uranusjr merged commit 422cb0b into pypa:main May 17, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants