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, python-dev, serhiy.storchaka, terry.reedy, yselivanov
Date 2021-08-06.15:18:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1628263095.04.0.275776325849.issue25782@roundup.psfhosted.org>
In-reply-to
Content
Serhiy's patch is modifying a different part of this system - he changes the Exception object's SetContext to break cycles when they are first created. Dennis and I targeted the place where an exception is about to be raised and it gets a __context__ that may contain a cycle already.

I think it's possible to take the more drastic step of preventing the cycles being created altogether, as Serhiy did. I would prefer that we raise an exception and refuse to create the cycle rather than try to fix it.  I don't think we can come up with a meaningful fix to what is, really, a user bug.

In any case, at the moment we have a situation where user bugs (like Issue40696) can cause the interpreter to hang, and if we need more time to decide about the full strategy, we should at least prevent the hang.
History
Date User Action Args
2021-08-06 15:18:15iritkatrielsetrecipients: + iritkatriel, georg.brandl, terry.reedy, ncoghlan, chris.jerdonek, Yury.Selivanov, python-dev, serhiy.storchaka, yselivanov, Rotem Yaari, larsonreever, Dennis Sweeney
2021-08-06 15:18:15iritkatrielsetmessageid: <1628263095.04.0.275776325849.issue25782@roundup.psfhosted.org>
2021-08-06 15:18:15iritkatriellinkissue25782 messages
2021-08-06 15:18:14iritkatrielcreate