Message9809

Author jmadden
Recipients jmadden
Date 2015-04-13.18:23:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1428949389.77.0.536153134809.issue2323@psf.upfronthosting.co.za>
In-reply-to
Content
This code recurses infinitely on Jython2.7RC2:

>>> class X(object):
...     def __reduce__(self): return object.__reduce__(self)
...
>>> X().__reduce__()
Traceback (most recent call last):
 ...
RuntimeError: maximum recursion depth exceeded (Java StackOverflowError)

But works fine on CPython 2.7 and PyPy 2.5:

>>> class X(object):
...    def __reduce__(self): return object.__reduce__(self)
...
>>> X().__reduce__()
(<function _reconstructor at 0x1028912a8>, (<class '__main__.X'>, <type 'object'>, None))

Interestingly, using `super(X,self).__reduce__()` works correctly.

I suspect this may be a known issue because the tests for it were disabled in https://hg.python.org/jython/rev/c82067c0766f.
History
Date User Action Args
2015-04-13 18:23:09jmaddensetmessageid: <1428949389.77.0.536153134809.issue2323@psf.upfronthosting.co.za>
2015-04-13 18:23:09jmaddensetrecipients: + jmadden
2015-04-13 18:23:09jmaddenlinkissue2323 messages
2015-04-13 18:23:09jmaddencreate