summaryrefslogtreecommitdiff
path: root/src/pip/_internal/resolution/resolvelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/pip/_internal/resolution/resolvelib')
-rw-r--r--src/pip/_internal/resolution/resolvelib/candidates.py6
-rw-r--r--src/pip/_internal/resolution/resolvelib/factory.py2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/pip/_internal/resolution/resolvelib/candidates.py b/src/pip/_internal/resolution/resolvelib/candidates.py
index e5e9d1fd7..31020e27a 100644
--- a/src/pip/_internal/resolution/resolvelib/candidates.py
+++ b/src/pip/_internal/resolution/resolvelib/candidates.py
@@ -259,7 +259,7 @@ class LinkCandidate(_InstallRequirementBackedCandidate):
version: Optional[CandidateVersion] = None,
) -> None:
source_link = link
- cache_entry = factory.get_wheel_cache_entry(link, name)
+ cache_entry = factory.get_wheel_cache_entry(source_link, name)
if cache_entry is not None:
logger.debug("Using cached wheel link: %s", cache_entry.link)
link = cache_entry.link
@@ -277,8 +277,10 @@ class LinkCandidate(_InstallRequirementBackedCandidate):
)
if cache_entry is not None:
+ assert ireq.link.is_wheel
+ assert ireq.link.is_file
if cache_entry.persistent and template.link is template.original_link:
- ireq.original_link_is_in_wheel_cache = True
+ ireq.cached_wheel_source_link = source_link
if cache_entry.origin is not None:
ireq.download_info = cache_entry.origin
else:
diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_internal/resolution/resolvelib/factory.py
index 0ad4641b1..0331297b8 100644
--- a/src/pip/_internal/resolution/resolvelib/factory.py
+++ b/src/pip/_internal/resolution/resolvelib/factory.py
@@ -535,7 +535,7 @@ class Factory:
hash mismatches. Furthermore, cached wheels at present have
nondeterministic contents due to file modification times.
"""
- if self._wheel_cache is None or self.preparer.require_hashes:
+ if self._wheel_cache is None:
return None
return self._wheel_cache.get_cache_entry(
link=link,