Commit 8397282a authored by Jérome Perrin's avatar Jérome Perrin Committed by Arnaud Fontaine

patches/Restricted: adjust datetime _strptime import workaround for py3

parent 0bb01b42
......@@ -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