[issue11286] Some "trivial" python 2.x pickles fails to load in Python 3.2

Jesús Cea Avión report at bugs.python.org
Tue Feb 22 16:05:28 CET 2011


Jesús Cea Avión <jcea at jcea.es> added the comment:

I got a trivial (41 bytes long) reproductable case:

Pickle the following structure in Python 2.7, and try to unpickle with Python 3.2, using a "latin1" encoding:

"""
{'ya_volcados': {'comment': ''}}
"""

Load with:

"""
#!/usr/local/bin/python3

import pickle

f=open("z.pickle", "rb").read()

a=pickle.loads(f,encoding="latin1")
"""

(I use "latin1" because my real pickle includes binary data stored as strings. Note that the testcase doesn't content binary data).

Python 3.2, 32 bits. Tested under Solaris and Linux.

This worked in Python 3.1.3, so we have a regression.

----------
keywords: +3.2regression
stage: test needed -> needs patch
Added file: http://bugs.python.org/file20839/z.pickle

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


More information about the Python-bugs-list mailing list