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

Enforce and backtrack on invalid versions in source metadata #2954

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

charliermarsh
Copy link
Member

Summary

If we build a source distribution from the registry, and the version doesn't match that of the filename, we should error, just as we do for mismatched package names. However, we should also backtrack here, which we didn't previously.

Closes #2953.

Test Plan

Verified that cargo run pip install docutils --verbose --no-cache --reinstall installs docutils==0.21 instead of the invalid docutils==0.21.post1.

In the logs, I see:

WARN Unable to extract metadata for docutils: Package metadata version `0.21` does not match given version `0.21.post1`

@charliermarsh charliermarsh changed the title Validate built version in source distribution database Enforce and backtrack on invalid versions in source metadata Apr 10, 2024
@charliermarsh charliermarsh added the enhancement New feature or request label Apr 10, 2024
@charliermarsh charliermarsh marked this pull request as ready for review April 10, 2024 05:03
@charliermarsh charliermarsh enabled auto-merge (squash) April 10, 2024 05:12
@charliermarsh charliermarsh merged commit c4472eb into main Apr 10, 2024
36 checks passed
@charliermarsh charliermarsh deleted the charlie/docutils branch April 10, 2024 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Behaviour when metadata is incorrect differs from pip
1 participant