[issue12791] reference cycle with exception state not broken by generator.close()

2011-08-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the report, fixed. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___

[issue12791] reference cycle with exception state not broken by generator.close()

2011-08-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 867ce75b885c by Antoine Pitrou in branch '3.2': Issue #12791: Break reference cycles early when a generator exits with an exception. http://hg.python.org/cpython/rev/867ce75b885c New changeset 7d390c3a83c6 by Antoine Pitrou in branch 'default': Is

[issue12791] reference cycle with exception state not broken by generator.close()

2011-08-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. -- keywords: +patch Added file: http://bugs.python.org/file22961/genexcstate.patch ___ Python tracker ___

[issue12791] reference cycle with exception state not broken by generator.close()

2011-08-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: The problem is probably that the frame keeps the last execution state around, and since the exception itself has a reference to a frame, a cycle is created. Note that it doesn't happen if you catch the GeneratorExit that gets raised inside the generator at sh