[issue6137] Make pickle generated by Python 3.x compatible with 2.x and vice-versa.

Guido van Rossum report at bugs.python.org
Tue Jun 9 21:03:00 CEST 2009


Guido van Rossum <guido at python.org> added the comment:

Ah. How about only doing back-translation when protocol=2 (or lower)
is explicitly selected?

I don't much like that 3.0 will be to read pickles written by 3.1 with
the default protocol (i.e. 3), but I don't mind breaking protocol 2,
since that's most likely (as you say) intended for Python 2. So the
default for fix_imports would be None, and the __init__ would check if
it's None, and then set it to (protocol <= 2).

----------

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


More information about the Python-bugs-list mailing list