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

Implement a --verify-hashes hash-checking mode #4007

Merged
merged 1 commit into from
Jul 17, 2024
Merged

Conversation

charliermarsh
Copy link
Member

Summary

This is an alternative to --require-hashes which will validate a hash if it's present, but ignore requirements that omit hashes or are absent from the lockfile entirely.

So, e.g., transitive dependencies that are missing will not error; nor will dependencies that are included but lack a hash.

Closes #3305.

@charliermarsh charliermarsh added the enhancement New feature or improvement to existing functionality label Jun 4, 2024
@charliermarsh
Copy link
Member Author

@helderco -- what do you think of this behavior? I'm wondering if we should instead implement it such that if any hash is present, we enforce hashes (i.e., a setting that enables pip's default "implied hashes" behavior).

@helderco
Copy link

helderco commented Jun 5, 2024

Yeah, requiring all hashes if any are present sgtm!

@charliermarsh charliermarsh force-pushed the charlie/ver branch 2 times, most recently from 76a83a2 to e01e7b8 Compare July 17, 2024 21:04
@charliermarsh
Copy link
Member Author

Moving forward with this since we need it as the default for the lockfile.

@charliermarsh charliermarsh enabled auto-merge (squash) July 17, 2024 21:16
@charliermarsh charliermarsh merged commit 82d9483 into main Jul 17, 2024
52 checks passed
@charliermarsh charliermarsh deleted the charlie/ver branch July 17, 2024 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implied "--require-hashes"?
2 participants