[issue22005] datetime.__setstate__ fails decoding python2 pickle

Alexander Belopolsky report at bugs.python.org
Mon Oct 12 14:19:12 EDT 2015


Alexander Belopolsky added the comment:

> The first issue can be solved by accepting str argument and encoding it to bytes.

A strong -1 from me.  Accepting bytes objects for year in 3.x (and str in 2.x) is a gross hack.  In the long run, I would like to see a public named constructor, e.g. datetime.datetime.load to be used in datetime pickles.

Can someone explain succinctly what the problem is?  Does it only affect pickles transferred between 2.x and 3.x Pythons?  If not, how can I reproduce the problem in 3.5?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22005>
_______________________________________


More information about the Python-bugs-list mailing list