This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients alexandre.vassalotti, belopolsky, eddygeek, pitrou, tim.peters
Date 2014-07-18.18:53:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I have no idea what was done to pickle for Python3, but this line works for me to unpickle a Python2 protocol 2 datetime pickle under Python3, where P2 is the Python2 pickle string:

    pickle.loads(bytes(P2, encoding='latin1'), encoding='bytes')

For example,

>>> P2
>>> pickle.loads(bytes(P2, encoding='latin1'), encoding='bytes')
datetime.datetime(2014, 7, 18, 13, 37, 37, 451000)

I don't understand the Python3 loads() docs with respect to the "encoding" and "errors" arguments, and can't guess whether this is the intended way.  It seems at best highly obscure.  But hard to argue with something that works ;-)
Date User Action Args
2014-07-18 18:53:01tim.peterssetrecipients: + tim.peters, belopolsky, pitrou, alexandre.vassalotti, eddygeek
2014-07-18 18:53:01tim.peterssetmessageid: <>
2014-07-18 18:53:01tim.peterslinkissue22005 messages
2014-07-18 18:53:01tim.peterscreate