Skip to content

Commit

Permalink
Cache PackageFinder.find_all_candidates()
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed Sep 26, 2020
1 parent 1135ac0 commit 1dd6d56
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pip/_internal/index/package_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from pip._internal.models.selection_prefs import SelectionPreferences
from pip._internal.models.target_python import TargetPython
from pip._internal.models.wheel import Wheel
from pip._internal.utils.compat import lru_cache
from pip._internal.utils.filetypes import WHEEL_EXTENSION
from pip._internal.utils.logging import indent_log
from pip._internal.utils.misc import build_netloc
Expand Down Expand Up @@ -799,6 +800,7 @@ def process_project_url(self, project_url, link_evaluator):

return package_links

@lru_cache(maxsize=None)
def find_all_candidates(self, project_name):
# type: (str) -> List[InstallationCandidate]
"""Find all available InstallationCandidate for project_name
Expand Down

0 comments on commit 1dd6d56

Please sign in to comment.