Brett Cannon <[EMAIL PROTECTED]> added the comment:

So the use of pickle is not fair as that doesn't round-trip if you
simply write out a file because py3k pickle doesn't like classic classes
and the new-style classes want copy_reg which is not in existence in
py3k since it was renamed. See pickle2write.py and pickle3read.py (which
are version-agnostic; just following Skip's naming) for the pickle failing.

Now if you skip that one use-case in the example of pickling a
user-defined class then everything works out. I have attached a
hacked-up version of Skip's scripts that take Unicode strings, encode
them in Latin-1 and UTF-8, and then decode them on the other side in
Py3K, all without issue.

In other words I think my solution works and pickle is the trouble-maker
in all of this.

----------
stage: commit review -> needs patch
Added file: http://bugs.python.org/file12097/pickle2write.py

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3799>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to