[issue13566] Array objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x

2015-05-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13566 ___ ___

[issue13566] Array objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x

2013-12-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13566 ___ ___

[issue13566] Array objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x

2013-12-18 Thread Vajrasky Kok
Vajrasky Kok added the comment: Alexandre Vassalotti said: We should still fix array in 2.7 to accept unicode object for the typecode though. I created issue #20014 (with the patch) for this feature. -- nosy: +vajrasky ___ Python tracker

[issue13566] Array objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x

2013-12-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue20015 for more general approach. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13566 ___

[issue13566] Array objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x

2013-12-18 Thread STINNER Victor
STINNER Victor added the comment: If you pickle an array object on python 3 the typecode is encoded as a unicode string rather than as a byte string. This makes python 2 reject the pickle. Pickles files of Python 3 are supposed to be compatible with Python 2? It looks very tricky to

[issue13566] Array objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x

2013-12-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Adding a special type is not a bad idea. We have to keep the code for loading BINSTRING opcodes anyway, so we might as well use it. It could be helpful for unit-testing our Python 2 compatibility support for pickle. We should still fix array in 2.7 to

[issue13566] Array objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x

2011-12-09 Thread sbt
New submission from sbt shibt...@gmail.com: If you pickle an array object on python 3 the typecode is encoded as a unicode string rather than as a byte string. This makes python 2 reject the pickle. # Python 3.3.0a0 (default, Dec 8 2011, 17:56:13)

[issue13566] Array objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x

2011-12-09 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +alexandre.vassalotti, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13566 ___ ___

[issue13566] Array objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x

2011-12-09 Thread maniram maniram
maniram maniram maniandra...@gmail.com added the comment: The problem is that pickle is calling array.array(u'i',[1,2,3]) and array.array in Python 2 doesn't allow unicode strings as a typecode (typecode is the first argument) The docs in Python 2 and Py3k doesn't specify the type of the

[issue13566] Array objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x

2011-12-09 Thread sbt
sbt shibt...@gmail.com added the comment: I suggest that array.array be changed in Python 2 to allow unicode strings as a typecode or that pickle detects array.array being called and fixes the call. Interestingly, py3 does understand arrays pickled by py2. This appears to be because py2