From fd036451bf0e0ade8783e21df801abf7be96d020 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Tue, 19 Aug 2008 17:56:33 +0000 Subject: #2834: Change re module semantics, so that str and bytes mixing is forbidden, and str (unicode) patterns get full unicode matching by default. The re.ASCII flag is also introduced to ask for ASCII matching instead. --- Lib/plistlib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/plistlib.py') diff --git a/Lib/plistlib.py b/Lib/plistlib.py index b7753246a5..83e5d04a03 100644 --- a/Lib/plistlib.py +++ b/Lib/plistlib.py @@ -147,7 +147,7 @@ class DumbXMLWriter: # Contents should conform to a subset of ISO 8601 # (in particular, YYYY '-' MM '-' DD 'T' HH ':' MM ':' SS 'Z'. Smaller units may be omitted with # a loss of precision) -_dateParser = re.compile(r"(?P\d\d\d\d)(?:-(?P\d\d)(?:-(?P\d\d)(?:T(?P\d\d)(?::(?P\d\d)(?::(?P\d\d))?)?)?)?)?Z") +_dateParser = re.compile(r"(?P\d\d\d\d)(?:-(?P\d\d)(?:-(?P\d\d)(?:T(?P\d\d)(?::(?P\d\d)(?::(?P\d\d))?)?)?)?)?Z", re.ASCII) def _dateFromString(s): order = ('year', 'month', 'day', 'hour', 'minute', 'second') -- cgit v1.2.1