[issue2307] Decide what to do with bytes/str when transferring pickles between 2.6 and 3.0

2008-03-17 Thread Guido van Rossum
Guido van Rossum [EMAIL PROTECTED] added the comment: We have a proposed solution for 2.x - 3.x. In 3.x, an (8-bit) str instance received from 2.x will be decoded into a (Unicode) str instance. The encoding defaults to ASCII; you can specify a different encoding and also an error value on the

[issue2307] Decide what to do with bytes/str when transferring pickles between 2.6 and 3.0

2008-03-17 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti [EMAIL PROTECTED]: -- nosy: +alexandre.vassalotti __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2307 __ ___ Python-bugs-list mailing

[issue2307] Decide what to do with bytes/str when transferring pickles between 2.6 and 3.0

2008-03-17 Thread Guido van Rossum
Guido van Rossum [EMAIL PROTECTED] added the comment: Checked in as r61467. When pickling a bytes instance in a protocol 3, it is pickled as a user-defined type (essentially faking a __reduce__ operation) which can be read back correctly in 3.0 but probably not in 2.x. -- resolution:

[issue2307] Decide what to do with bytes/str when transferring pickles between 2.6 and 3.0

2008-03-16 Thread Guido van Rossum
New submission from Guido van Rossum [EMAIL PROTECTED]: A pickled str instance written by 2.6 currently unpickles under 3.0 as a bytes instance. That would be correct if the intended use is binary data, but it's wrong if the intended use is text. My hunch is that there's more pickled text than