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 pitrou
Recipients benjamin.peterson, ncoghlan, pitrou
Date 2013-04-21.01:37:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1366508251.45.0.78173664702.issue17807@psf.upfronthosting.co.za>
In-reply-to
Content
This experimental patch proposes to defer generator cleanup to the frame itself. In this scheme, the generator frame's tp_clear throws the GeneratorExit if necessary, so as to call cleanup code. The generator doesn't have any tp_del anymore, as it is now impossible to resurrect a generator (the frame, though, can be resurrected; I have to add a test for that).

The net effect is that generators caught in a reference cycle can always be reclaimed, and their cleanup code is run in a valid frame.
History
Date User Action Args
2013-04-21 01:37:32pitrousetrecipients: + pitrou, ncoghlan, benjamin.peterson
2013-04-21 01:37:31pitrousetmessageid: <1366508251.45.0.78173664702.issue17807@psf.upfronthosting.co.za>
2013-04-21 01:37:31pitroulinkissue17807 messages
2013-04-21 01:37:31pitroucreate