Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
--
status: pending - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1581183
___
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
I am going to close this as a duplicate of issue 1062277. The later has a
patch, but Raymond questioned whether proposed feature is desirable. [msg47268]
I am -1, but will look at the patch there.
--
nosy:
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
--
components: +Documentation
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1581183
___
Alexander Belopolsky belopol...@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
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
Removed file: http://bugs.python.org/file17800/issue1581183-test.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1581183
___
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
Added file: http://bugs.python.org/file17801/issue1581183-test.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1581183
___
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
Upon further investigation, I conclude that the problem is in the user code. I
am attaching int_subclass_pickle_problem_fixed.py which fixes the user code as
follows:
def __getnewargs__(self):
-return
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
I reproduced the problem in py3k (both protocol 2 and 3). See
issue1581183-test-py3k.py attached.
--
nosy: +alexandre.vassalotti, belopolsky
versions: +Python 3.2
Added file:
Daniel Diniz aja...@gmail.com added the comment:
Confirmed on trunk, has tests.
--
nosy: +ajaksu2
stage: - needs patch
title: pickle protocol 2 failure on int subclass - pickle protocol 2 failure
on int subclass
type: - behavior
versions: +Python 2.6