summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2007-11-13 21:54:28 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2007-11-13 21:54:28 (GMT)
commit0d75f09177cea068ad9eec438ff6425e6c2355fc (patch)
tree6b8fce0fb8905c98039bbef0c8c18f96e1526881 /Misc
parent0288cb0ba8f98119e0badad583e43e2ae7778877 (diff)
downloadcpython-0d75f09177cea068ad9eec438ff6425e6c2355fc.zip
cpython-0d75f09177cea068ad9eec438ff6425e6c2355fc.tar.gz
cpython-0d75f09177cea068ad9eec438ff6425e6c2355fc.tar.bz2
Merge from py3k branch:
Correction for issue1265 (pdb bug with "with" statement). When an unfinished generator-iterator is garbage collected, PyEval_EvalFrameEx is called with a GeneratorExit exception set. This leads to funny results if the sys.settrace function itself makes use of generators. A visible effect is that the settrace function is reset to None. Another is that the eventual "finally" block of the generator is not called. It is necessary to save/restore the exception around the call to the trace function. This happens a lot with py3k: isinstance() of an ABCMeta instance runs def __instancecheck__(cls, instance): """Override for isinstance(instance, cls).""" return any(cls.__subclasscheck__(c) for c in {instance.__class__, type(instance)}) which lets an opened generator expression each time it returns True. Backport candidate, even if the case is less frequent in 2.5.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS4
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index dfc5256..9da2ba8 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,10 @@ What's New in Python 2.6 alpha 1?
Core and builtins
-----------------
+- Issue #1265: Fix a problem with sys.settrace, if the tracing function uses a
+ generator expression when at the same time the executed code is closing a
+ paused generator.
+
- sets and frozensets now have an isdisjoint() method.
- optimize the performance of builtin.sum().