From: SourceForge.net <no...@so...> - 2007-01-25 19:34:30
|
Bugs item #1291509, was opened at 2005-09-14 19:57 Message generated for change (Comment added) made by cgroves You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=1291509&group_id=12867 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Core >Group: None Status: Open Resolution: None Priority: 6 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: cPickling bug Initial Comment: I get a ClassCastException when the unpickler tried to call __setstate__. It works fine with CPython (both pickle and cPickle) and it works fie when I use pickle in jython. But it fails using cPickle in Jython. ---------------------------------------------------------------------- >Comment By: Charles Groves (cgroves) Date: 2007-01-25 14:34 Message: Logged In: YES user_id=1174327 Originator: NO I was mainly leaving this open because test_cpickle still fails. Moving this out of 2.2beta since we're not focusing on library compatibility as much. ---------------------------------------------------------------------- Comment By: leouser (leouserz) Date: 2007-01-15 11:43 Message: Logged In: YES user_id=1277399 Originator: NO Is there a test case for this? import cPickle a = cPickle() i = 1000 x = a.dumps(i) print x v = a.loads(x) print v this works ok. Also a class that defines __setstate__ works ok from what I can see: >>> class f: ... def __setstate__(self, r): ... print r ... >>> g = f() >>> x = a.dumps(g) >>> x '(i__main__\nf\np1\n(dp2\nb.' >>> x2 = a.loads(x) {} >>> x2 <__main__.f instance 1> >>> ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=1291509&group_id=12867 |