Skip to content

Commit 9732729

Browse files
committed
Set limited maxsize for requirement parsing cache
1 parent 98d8401 commit 9732729

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pip/_internal/utils/packaging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def get_installer(dist: Distribution) -> str:
7373
return ""
7474

7575

76-
@functools.lru_cache(maxsize=None)
76+
@functools.lru_cache(maxsize=512)
7777
def get_requirement(req_string: str) -> Requirement:
7878
"""Construct a packaging.Requirement object with caching"""
7979
# Parsing requirement strings is expensive, and is also expected to happen

0 commit comments

Comments
 (0)