Skip to content

Commit 6b18cba

Browse files
committed
More precise download_info with legacy cache entries
This should not matter in practice but let's be correct. Since there is always a cache (the transient or persistent cache), only the persistent cache matters when deciding if something is actually cached.
1 parent 659f0dc commit 6b18cba

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/pip/_internal/resolution/legacy/resolver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ def _populate_link(self, req: InstallRequirement) -> None:
438438
# Legacy cache entry that does not have origin.json.
439439
# download_info may miss the archive_info.hash field.
440440
req.download_info = direct_url_from_link(
441-
req.link, link_is_in_wheel_cache=True
441+
req.link, link_is_in_wheel_cache=cache_entry.persistent
442442
)
443443
req.link = cache_entry.link
444444

src/pip/_internal/resolution/resolvelib/candidates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def __init__(
291291
# Legacy cache entry that does not have origin.json.
292292
# download_info may miss the archive_info.hash field.
293293
ireq.download_info = direct_url_from_link(
294-
source_link, link_is_in_wheel_cache=True
294+
source_link, link_is_in_wheel_cache=cache_entry.persistent
295295
)
296296

297297
super().__init__(

0 commit comments

Comments
 (0)