Fix BytesWarnings in fnmatch

This commit is contained in:
Antoine Pitrou 2011-11-08 18:39:15 +01:00
parent a8f63c02ef
commit 682ca1e6e2
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ def fnmatch(name, pat):
pat = os.path.normcase(pat)
return fnmatchcase(name, pat)
@functools.lru_cache(maxsize=250)
@functools.lru_cache(maxsize=250, typed=True)
def _compile_pattern(pat):
if isinstance(pat, bytes):
pat_str = str(pat, 'ISO-8859-1')