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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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 request 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).

@charliermarsh charliermarsh marked this pull request as ready for review June 4, 2024 01:52
@helderco
Copy link

helderco commented Jun 5, 2024

Yeah, requiring all hashes if any are present sgtm!

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.

Implied "--require-hashes"?
2 participants