summaryrefslogtreecommitdiffstats
path: root/Lib/_strptime.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-03-24 23:21:50 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-03-24 23:21:50 (GMT)
commit15fa1c4ade79060e340a656e1f69c70ebe355171 (patch)
tree78f47f3f1551468932291b8706bda8249c3491aa /Lib/_strptime.py
parent8be6be427d7af54cd2dcc5f7c8f73ec2a1e2dfcc (diff)
downloadcpython-15fa1c4ade79060e340a656e1f69c70ebe355171.zip
cpython-15fa1c4ade79060e340a656e1f69c70ebe355171.tar.gz
cpython-15fa1c4ade79060e340a656e1f69c70ebe355171.tar.bz2
Fixed using deprecated escaping in regular expression in _strptime.py (issue23622).
Diffstat (limited to 'Lib/_strptime.py')
-rw-r--r--Lib/_strptime.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/_strptime.py b/Lib/_strptime.py
index f4a98ec..374923d 100644
--- a/Lib/_strptime.py
+++ b/Lib/_strptime.py
@@ -253,8 +253,8 @@ class TimeRE(dict):
# format directives (%m, etc.).
regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])")
format = regex_chars.sub(r"\\\1", format)
- whitespace_replacement = re_compile('\s+')
- format = whitespace_replacement.sub('\s+', format)
+ whitespace_replacement = re_compile(r'\s+')
+ format = whitespace_replacement.sub(r'\\s+', format)
while '%' in format:
directive_index = format.index('%')+1
processed_format = "%s%s%s" % (processed_format,