This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author georg.brandl
Recipients Antony.Lee, Jim.Jewett, Trundle, Yury.Selivanov, barry, benjamin.peterson, cvrebert, daniel.urban, eric.araujo, ethan.furman, gcbirzan, georg.brandl, gvanrossum, jamesh, jwilk, ncoghlan, pitrou, yorik.sar
Date 2014-10-02.10:01:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412244110.12.0.400891916806.issue12029@psf.upfronthosting.co.za>
In-reply-to
Content
I'm attaching a patch that works without changing the recursion limit, and adds some tests for pathological cases.

Instead, PyErr_GivenExceptionMatches is changed so that if an exception was previously set, it is replaced by an exception that PyObject_IsSubclass raises.  In that way recursion errors should be propagated properly.

In exception matching, this means that exceptions (including recursion errors) from PyObject_IsSubclass are ignored.  There is already an explicit test for this behavior in test_exceptions.

This behavior *could* be changed if intended by introducing a variant of PyErr_GivenExceptionMatches that can set an exception even if none was set before, and calling that in cmp_outcome in ceval.
History
Date User Action Args
2014-10-02 10:01:50georg.brandlsetrecipients: + georg.brandl, gvanrossum, barry, jamesh, ncoghlan, pitrou, benjamin.peterson, jwilk, eric.araujo, Trundle, cvrebert, daniel.urban, yorik.sar, ethan.furman, Yury.Selivanov, Jim.Jewett, gcbirzan, Antony.Lee
2014-10-02 10:01:50georg.brandlsetmessageid: <1412244110.12.0.400891916806.issue12029@psf.upfronthosting.co.za>
2014-10-02 10:01:50georg.brandllinkissue12029 messages
2014-10-02 10:01:49georg.brandlcreate