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 iritkatriel
Recipients Dennis Sweeney, Rotem Yaari, Yury.Selivanov, chris.jerdonek, georg.brandl, iritkatriel, larsonreever, ncoghlan, oconnor663, python-dev, serhiy.storchaka, terry.reedy, yselivanov
Date 2021-08-06.14:47:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1628261241.04.0.337589756174.issue25782@roundup.psfhosted.org>
In-reply-to
Content
Like Dennis' patch, mine changes PyErr_SetObject. The difference is that Dennis' patch gets rid of the cycle while mine leaves it as it is, just avoids hanging on it.

So in this case:

    when trying to set the exception A on top of
        B -> C -> D -> E -> C -> ...,

The result would be simply

        A -> B -> C -> D -> E -> C -> ...,

As I said in msg391637, a pre-existing cycle is due to a bug somewhere, and I don't think PyErr_SetObject can or should try to fix that bug.  Nonsense in, nonsense out. If we change it we probably just make it more nonsensical.
History
Date User Action Args
2021-08-06 14:47:21iritkatrielsetrecipients: + iritkatriel, georg.brandl, terry.reedy, ncoghlan, chris.jerdonek, Yury.Selivanov, python-dev, serhiy.storchaka, yselivanov, oconnor663, Rotem Yaari, larsonreever, Dennis Sweeney
2021-08-06 14:47:21iritkatrielsetmessageid: <1628261241.04.0.337589756174.issue25782@roundup.psfhosted.org>
2021-08-06 14:47:21iritkatriellinkissue25782 messages
2021-08-06 14:47:20iritkatrielcreate