-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Fix cache bug with legacy cache entries #7490
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
7d781c3
to
b92914a
Compare
b92914a
to
7b998a7
Compare
7b998a7
to
36ff884
Compare
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.
Nice catch 👍
(wheel.support_index_min(supported_tags), wheel_name) | ||
( | ||
wheel.support_index_min(supported_tags), | ||
wheel_name, |
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.
nitpick: it's unlikely that the min()
call would depend on the wheel_name
.
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.
At least this is equivalent to the previous behavior. Alternatively, we may want to separately consider whether an sdist may produce a wheel with "build tag" that should be taken into account even in the cache.
Merging since this has multiple approving reviews. |
Thanks |
Fix an unreleased bug from #7319, in the handling of legacy cache entries.
The bug manifests itself when only a legacy cache entry exist for a given link, in which case pip would error like this:
This is because
_get_candidates
returned cached wheel names and not their cache directory, with the cache directory later being reconstructed in_link_for_candidate
. I fix this by returning awheel_name, wheel_dir
tuple so callers do not need to do any guesswork to find the directory.