-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Set the requirement context on hash error #8445
Conversation
This improves the message shown by the hash error to include the requirement that caused it.
Is there some reason we can't aggregate the hash errors? Or is it omitted to minimize implementation complexity? |
I guess it’s kind of both or neither. Currently the distribution is prepared lazily (when |
I don't think we want to eagerly prepare the distribution just for this issue. It might be a good thing to do, but there's a risk we hurt performance by preparing stuff we don't need to. We don't have test cases that would allow us to easily check that. I'd be OK with a follow-up PR specifically to investigate the impact of eagerly preparing. It's possible it was a premature optimisation. |
@pfmoore @uranusjr @pradyunsg OK to go ahead and merge this, in the interests of moving along things from the "in-progress" column to "Done"? :-) |
@pfmoore, per a private discussion with @pradyunsg yesterday,
With GH-7819 in mind, we can acquire different methods to get (1) (e.g. shallow wheel, to-be-matured-JSON API), while (2) can be ensure after dependency resolution either automatically or manually getting Now if hashing is required, in (1) what calls Relating to |
@pradyunsg Gentle ping, this is awaiting your approval. I'm assuming from @McSinyx' comment, referring to a discussion that you had with them, that you're on board with sorting out aggregation later, but I'll let you confirm that explicitly. |
I think that's context from a slightly different conversation. |
I thought I'd already done this! >.< Merging! |
This improves the message shown by the hash error to include the requirement that caused it.
This partially addresses
test_hashed_install_failure_later_flag
. The behaviour is still different from the legacy resolver’s, which collects all hash errors and raise an aggregatedHashErrors
exception instead.Before:
After: