summaryrefslogtreecommitdiff
path: root/Lib/http/cookiejar.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/http/cookiejar.py')
-rw-r--r--Lib/http/cookiejar.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/http/cookiejar.py b/Lib/http/cookiejar.py
index 6d4572af03..adf956d66a 100644
--- a/Lib/http/cookiejar.py
+++ b/Lib/http/cookiejar.py
@@ -200,7 +200,7 @@ def _str2time(day, mon, yr, hr, min, sec, tz):
STRICT_DATE_RE = re.compile(
r"^[SMTWF][a-z][a-z], (\d\d) ([JFMASOND][a-z][a-z]) "
- "(\d\d\d\d) (\d\d):(\d\d):(\d\d) GMT$", re.ASCII)
+ r"(\d\d\d\d) (\d\d):(\d\d):(\d\d) GMT$", re.ASCII)
WEEKDAY_RE = re.compile(
r"^(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)[a-z]*,?\s*", re.I | re.ASCII)
LOOSE_HTTP_DATE_RE = re.compile(
@@ -277,7 +277,7 @@ def http2time(text):
return _str2time(day, mon, yr, hr, min, sec, tz)
ISO_DATE_RE = re.compile(
- """^
+ r"""^
(\d{4}) # year
[-\/]?
(\d\d?) # numerical month
@@ -411,7 +411,7 @@ def split_header_words(header_values):
pairs = []
else:
# skip junk
- non_junk, nr_junk_chars = re.subn("^[=\s;]*", "", text)
+ non_junk, nr_junk_chars = re.subn(r"^[=\s;]*", "", text)
assert nr_junk_chars > 0, (
"split_header_words bug: '%s', '%s', %s" %
(orig_text, text, pairs))