From 682ca1e6e2546361a4cb117f522ca2886f35d572 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Tue, 8 Nov 2011 18:39:15 +0100 Subject: [PATCH] Fix BytesWarnings in fnmatch --- Lib/fnmatch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/fnmatch.py b/Lib/fnmatch.py index 3df20d8a14a..f446769b9f6 100644 --- a/Lib/fnmatch.py +++ b/Lib/fnmatch.py @@ -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')