Commit 780584a4 authored by Jérome Perrin's avatar Jérome Perrin Committed by Kazuhiko Shiozaki

patches/Restricted: adjust datetime _strptime import workaround for py3

parent 7a491e96
......@@ -370,6 +370,8 @@ allow_class_attribute(datetime.tzinfo)
# This prevents both importing _strptime with level=0, and accessing __doc__,
# when calling datetime.datetime.strptime().
import _strptime
# on python3 it seems we actually need to call strptime for this.
datetime.datetime.strptime('', '')
# Allow dict.fromkeys, Only this method is a class method in dict module.
allow_class_attribute(dict, {'fromkeys': 1})
......
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