mirror of https://github.com/pypa/pip
Set limited maxsize for requirement parsing cache
This commit is contained in:
parent
98d8401035
commit
97327292c6
|
@ -73,7 +73,7 @@ def get_installer(dist: Distribution) -> str:
|
|||
return ""
|
||||
|
||||
|
||||
@functools.lru_cache(maxsize=None)
|
||||
@functools.lru_cache(maxsize=512)
|
||||
def get_requirement(req_string: str) -> Requirement:
|
||||
"""Construct a packaging.Requirement object with caching"""
|
||||
# Parsing requirement strings is expensive, and is also expected to happen
|
||||
|
|
Loading…
Reference in New Issue