mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
bpo-42799: fnmatch module: bump up size of lru_cache for patterns (GH-27084)
This commit is contained in:
parent
3527569f1c
commit
b39eea06d1
3 changed files with 8 additions and 1 deletions
|
|
@ -41,7 +41,7 @@ def fnmatch(name, pat):
|
|||
pat = os.path.normcase(pat)
|
||||
return fnmatchcase(name, pat)
|
||||
|
||||
@functools.lru_cache(maxsize=256, typed=True)
|
||||
@functools.lru_cache(maxsize=32768, typed=True)
|
||||
def _compile_pattern(pat):
|
||||
if isinstance(pat, bytes):
|
||||
pat_str = str(pat, 'ISO-8859-1')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue