Kaydet (Commit) e4818f69 authored tarafından Serhiy Storchaka's avatar Serhiy Storchaka

Remove the use of non-existing re.ASCII.

(fixes a regression in 3d46ef0c62c5, issue #18873)
üst e787bce7
......@@ -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."
......
......@@ -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."""
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment