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

pep508.parseMarkers: Make platform_release a distinct type #150

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

adisbladis
Copy link
Member

@adisbladis adisbladis commented Sep 10, 2024

platform_release parsing is more complicated than other fields. It can be either a PEP-440 version, or a non-compliant version string.

If both lhs and rhs were correctly parsed as PEP-440 versions run regular version comparison, otherwise compare lexicographically

See:

--

Reported by @TyberiusPrime in chat with https://github.com/TyberiusPrime/20240909_pep508_nix_pyobjc_bug/tree/main as a repro.

`platform_release` parsing is more complicated than other fields. It can be either a PEP-440 version, or a non-compliant version string.

If both lhs and rhs were correctly parsed as PEP-440 versions run regular version comparison, otherwise compare lexicographically

See:
- pypa/packaging#774
- astral-sh/uv#3917 (comment)
@adisbladis adisbladis merged commit 8a8d3b2 into master Sep 10, 2024
11 checks passed
@adisbladis adisbladis deleted the pep508-platform-release-type branch September 25, 2024 09:26
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.

1 participant