Commit 8e2de514 authored by Jérome Perrin's avatar Jérome Perrin

ERP5Type/patches/DateTimePatch: fix name of copy_reg._reconstructor

This is patched to DateTime.DateTime._dt_reconstructor but we don't
want _dt_reconstructor to appear in pickles, especially business
templates ones.
parent a6e05817
......@@ -249,6 +249,12 @@ def DateTime_parse(self, st, datefmt=getDefaultDateFormat()):
DateTimeKlass._parse = DateTime_parse
# XXX fix name for new style classes pickles
import copy_reg
copy_reg._reconstructor.__module__ = 'copy_reg'
copy_reg._reconstructor.__name__ = '_reconstructor'
if __name__ == '__main__':
for i in ('2007/01/02 12:34:56.789',
'2007/01/02 12:34:56.789 GMT+0200',
......
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