Serhiy Storchaka added the comment:

Proposed patch pickles all ascii strings with protocols < 3 and fix_import=True 
with compatible opcodes (STRING, BINSTRING and SHORT_BINSTRING). Pickled 
strings are unpickled as str in Python 2 and Python 3 (unless encoding="bytes").

As a side effect, short ascii strings (length < 256) are pickled more compact 
with protocols < 3.

----------
keywords: +patch
stage: needs patch -> patch review
title: Array objects pickled in 3.x with protocol <=2 are unpickled incorrectly 
in 2.x -> Increase pickle compatibility
type: behavior -> enhancement
versions: +Python 3.5 -Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file39348/pickle_old_strings.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13566>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to