Author: Armin Rigo <[email protected]>
Branch:
Changeset: r45619:d7287648ee0d
Date: 2011-07-15 13:39 +0200
http://bitbucket.org/pypy/pypy/changeset/d7287648ee0d/
Log: Oups. test_weakref shows that this is needed.
diff --git a/pypy/interpreter/generator.py b/pypy/interpreter/generator.py
--- a/pypy/interpreter/generator.py
+++ b/pypy/interpreter/generator.py
@@ -145,11 +145,11 @@
def __del__(self):
# Only bother enqueuing self to raise an exception if the frame is
# still not finished and finally or except blocks are present.
+ self.clear_all_weakrefs()
if self.frame is not None:
block = self.frame.lastblock
while block is not None:
if not isinstance(block, LoopBlock):
- self.clear_all_weakrefs()
self.enqueue_for_destruction(self.space,
GeneratorIterator.descr_close,
"interrupting generator of ")
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit