[issue17711] Persistent id in pickle with protocol version 0

2016-10-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue17711] Persistent id in pickle with protocol version 0

2016-07-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset f6a41552a312 by Serhiy Storchaka in branch '3.5': Issue #17711: Fixed unpickling by the persistent ID with protocol 0. https://hg.python.org/cpython/rev/f6a41552a312 New changeset df8857c6f3eb by Serhiy Storchaka in branch 'default': Issue #17711: F

[issue17711] Persistent id in pickle with protocol version 0

2016-07-07 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue17711] Persistent id in pickle with protocol version 0

2016-07-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping again. -- versions: +Python 3.6 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list maili

[issue17711] Persistent id in pickle with protocol version 0

2016-06-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue17711] Persistent id in pickle with protocol version 0

2015-02-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch is updated to current sources. Also optimized writing ASCII strings and fixed tests. -- versions: +Python 3.5 -Python 3.3 Added file: http://bugs.python.org/file38128/fix_bad_persid_2.patch ___ Python tra

[issue17711] Persistent id in pickle with protocol version 0

2013-04-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think a string with character codes < 256 will be better for test_protocol0_is_ascii_only(). It can be latin1 encoded (Python 2 allows any 8-bit strings). PyUnicode_AsASCIIString() can be slower than _PyUnicode_AsStringAndSize() (actually PyUnicode_AsUTF8

[issue17711] Persistent id in pickle with protocol version 0

2013-04-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Here's a patch that fix the bug. -- assignee: -> alexandre.vassalotti keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file29842/fix_bad_persid.patch ___ Python tracker

[issue17711] Persistent id in pickle with protocol version 0

2013-04-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Even for alphanumeric strings Python 3 have a bug. It saves strings and load bytes objects. -- ___ Python tracker ___ ___

[issue17711] Persistent id in pickle with protocol version 0

2013-04-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: In protocol 0, the persistent ID is restricted to alphanumeric strings because of the problems that arise when the persistent ID contains newline characters. _pickle likely should be changed to use the ASCII decoded. And perhaps, we should check for embe

[issue17711] Persistent id in pickle with protocol version 0

2013-04-13 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Python 2 allows pickling and unpickling non-ascii persistent ids. In Python 3 C implementation of pickle saves persistent ids with protocol version 0 as utf8-encoded strings and loads as bytes. >>> import pickle, io >>> class MyPickler(pickle.Pickler): ...