Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1014b6c

Browse files
committed
merge
2 parents 832edde + d0dbb20 commit 1014b6c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/fnmatch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def fnmatch(name, pat):
3535
pat = os.path.normcase(pat)
3636
return fnmatchcase(name, pat)
3737

38-
@functools.lru_cache(maxsize=250, typed=True)
38+
@functools.lru_cache(maxsize=256, typed=True)
3939
def _compile_pattern(pat):
4040
if isinstance(pat, bytes):
4141
pat_str = str(pat, 'ISO-8859-1')

Lib/re.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def escape(pattern):
261261

262262
_pattern_type = type(sre_compile.compile("", 0))
263263

264-
@functools.lru_cache(maxsize=500, typed=True)
264+
@functools.lru_cache(maxsize=512, typed=True)
265265
def _compile(pattern, flags):
266266
# internal: compile pattern
267267
if isinstance(pattern, _pattern_type):
@@ -273,7 +273,7 @@ def _compile(pattern, flags):
273273
raise TypeError("first argument must be string or compiled pattern")
274274
return sre_compile.compile(pattern, flags)
275275

276-
@functools.lru_cache(maxsize=500)
276+
@functools.lru_cache(maxsize=512)
277277
def _compile_repl(repl, pattern):
278278
# internal: compile replacement pattern
279279
return sre_parse.parse_template(repl, pattern)

0 commit comments

Comments
 (0)