Skip to content

Commit

Permalink
Change where we cache the package finder to alleviate issue collectin…
Browse files Browse the repository at this point in the history
…g hashes with multiple indexes.
  • Loading branch information
matteius committed Sep 23, 2024
1 parent 3607c35 commit fed6a94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pipenv/patched/pip/_internal/index/package_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ def __init__(
"""
if ignore_requires_python is None:
ignore_requires_python = False
if ignore_compatibility is None:
ignore_compatibility = True

self._allow_yanked = allow_yanked
self._canonical_name = canonical_name
Expand Down
2 changes: 1 addition & 1 deletion pipenv/utils/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
import importlib.metadata as importlib_metadata


@lru_cache(maxsize=None)
def get_package_finder(
install_cmd=None,
options=None,
Expand Down Expand Up @@ -327,6 +326,7 @@ def prepare_index_lookup(self):
alt_index_lookup[req_name] = index_mapping[index]
return alt_index_lookup

@cached_property
def package_finder(self):
finder = get_package_finder(
install_cmd=self.pip_command,
Expand Down

0 comments on commit fed6a94

Please sign in to comment.