Message2782
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. |
|
| Date |
User |
Action |
Args |
| 2008-02-20 17:18:45 | admin | link | issue1772134 messages |
| 2008-02-20 17:18:45 | admin | create | |
|