]> granicus.if.org Git - python/commitdiff
Remove the use of non-existing re.ASCII.
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 17 Sep 2013 07:09:08 +0000 (10:09 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Tue, 17 Sep 2013 07:09:08 +0000 (10:09 +0300)
(fixes a regression in 3d46ef0c62c5, issue #18873)

Lib/idlelib/IOBinding.py
Lib/lib2to3/pgen2/tokenize.py
Tools/scripts/findnocoding.py

index f5665b9dd00e726fac482fa049f314a620084b9c..2eae11b5411bcdeea982ea899b0ce7d9fa5fdac6 100644 (file)
@@ -71,7 +71,7 @@ else:
 
 encoding = encoding.lower()
 
-coding_re = re.compile(r'^[ \t\f]*#.*coding[:=][ \t]*([-\w.]+)', re.ASCII)
+coding_re = re.compile(r'^[ \t\f]*#.*coding[:=][ \t]*([-\w.]+)')
 
 class EncodingMessage(SimpleDialog):
     "Inform user that an encoding declaration is needed."
index 9cf2a69dc559e7abb3c83c51a7bbee327bacd74a..f6e0284c2f5837e8d81cc60b078ac36047ed65da 100644 (file)
@@ -236,7 +236,7 @@ class Untokenizer:
                 startline = False
             toks_append(tokval)
 
-cookie_re = re.compile(r'^[ \t\f]*#.*coding[:=][ \t]*([-\w.]+)', re.ASCII)
+cookie_re = re.compile(r'^[ \t\f]*#.*coding[:=][ \t]*([-\w.]+)')
 
 def _get_normal_name(orig_enc):
     """Imitates get_normal_name in tokenizer.c."""
index 838e57335380da9546ed4e687182a3c205b99188..5d932908d36333aee4d53381e5f2ca24ad227fcc 100755 (executable)
@@ -32,7 +32,7 @@ except ImportError:
                          "no sophisticated Python source file search will be done.")
 
 
-decl_re = re.compile(r'^[ \t\f]*#.*coding[:=][ \t]*([-\w.]+)', re.ASCII)
+decl_re = re.compile(r'^[ \t\f]*#.*coding[:=][ \t]*([-\w.]+)')
 
 def get_declaration(line):
     match = decl_re.match(line)