Message2782

Author yole
Recipients
Date 2007-08-11.09:23:43
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The datetime pickling previously failed for the following reason:
- datetime constructor checks if it was passed a string, and uses special code to deserialize its state from the string (which it generates in its __reduce__ method)
- pickle.py uses decode("string-escape") to unescape data loaded from pickle stream
- string.decode() used to always return PyUnicode, so the type check in the datetime constructor didn't pass.

The patch changes string.decode() to return PyObject, and changes the string-escape codec to return PyString rather than PyUnicode. In addition to datetime pickling, it enables some pickletools tests to pass.
History
Date User Action Args
2008-02-20 17:18:45adminlinkissue1772134 messages
2008-02-20 17:18:45admincreate