[issue1581183] pickle protocol 2 failure on int subclass
Alexander Belopolsky
report at bugs.python.org
Tue Jun 29 17:42:36 CEST 2010
Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:
At least part of the problem has nothing to do with subclassing from int and instead is related to pickling objects with circular references.
I am attaching a patch that demonstrates the problem. In issue1581183-test.diff, I modified memoize so that it does nothing rather than fails an assert if object is already in the memo. This makes python and C implementations behave the same, but still fail to produce correct results. Pickling with protocol 2 break circular reference and instead creates two independent objects.
----------
assignee: -> belopolsky
keywords: +patch
Added file: http://bugs.python.org/file17800/issue1581183-test.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1581183>
_______________________________________
More information about the Python-bugs-list
mailing list