[issue13566] Increase pickle compatibility

2017-03-06 Thread Josh Rosenberg
Josh Rosenberg added the comment: Right, but Antoine's objection is that suddenly strs pickled in Py3 can end up as strs in Py2, rather than unicode. If the library enforces a Py3-like type separation on Py2 (text arguments are unicode only, binary data is str only), then you have the problem

[issue13566] Increase pickle compatibility

2017-03-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file46703/pickle-old-strings-2.patch ___ Python tracker ___ ___ Python-bugs-l

[issue13566] Increase pickle compatibility

2017-02-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a problem when pickle data in Python 3 for unpickling in Python 2. -- versions: +Python 3.7 -Python 3.5 ___ Python tracker ___ ___

[issue13566] Increase pickle compatibility

2015-06-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: It's not a problem, since str *is* unicode in Python 3. -- ___ Python tracker ___ ___ Python-bugs-li

[issue13566] Increase pickle compatibility

2015-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Such libraries already have a problem. Both str and unicode pickled in Python 2 are unpickled as str in Python 3. -- ___ Python tracker ___ _

[issue13566] Increase pickle compatibility

2015-06-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: I wouldn't be very surprised if third-party libraries enforce such typing, yes. If your library has a clear text/bytes separation, it makes sense to enforce it at the API level, to avoid mistakes by users. -- ___ Py

[issue13566] Increase pickle compatibility

2015-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Does such API even exist? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13566] Increase pickle compatibility

2015-06-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Won't that fail if a Python 2 API accepts only unicode strings? -- ___ Python tracker ___ ___ Python

[issue13566] Increase pickle compatibility

2015-06-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Alexandre, Antoine, what are your thoughts? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13566] Increase pickle compatibility

2015-05-12 Thread Serhiy Storchaka
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