mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Cache PackageFinder.find_all_candidates()
This commit is contained in:
parent
1135ac041d
commit
1dd6d56278
1 changed files with 2 additions and 0 deletions
|
@ -25,6 +25,7 @@ from pip._internal.models.link import Link
|
|||
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
|
||||
|
@ -799,6 +800,7 @@ class PackageFinder(object):
|
|||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue