-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Avoid enforcing incorrect hash in mixed-hash settings #17157
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
Conversation
|
Alternatively, we can get rid of |
konstin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test for that that mixed hashes situation where there's a SHA256 here and a SHA512 there?
|
Do you have any advice on how to do that easily? |
|
A mockserver with a find links page that links to three entries in our |
This reverts commit 6fa8204.
…id (#17265) Fixes a regression from #17157 as reported in #17260 Closes #17260 Closes #17263 You can see the regression test fail [here](https://github.com/astral-sh/uv/actions/runs/20599629637/job/59162043790?pr=17269) in #17269 which cherry-picks the commit adding tests without the fix.
Summary
Right now, when we return a
Distfrom a lockfile, we concatenate all hashes for all distributions for a given package. In the case of #17143, I think that means we'll return the SHA256 from the sdist, plus the SHA512 from the wheel. If the wheel was previously installed (i.e., it's in the cache), and we computed the SHA256 at that point in time, thenHashed::has_digestswould returntruebecause we have at least one SHA256. We now limit the hashes to the distribution that we expect to install.Closes #17143.