normalize exceptions passed to the __exit__ method #7853
In Python 2.x, exceptions in finally blocks are not normalized. Since with
statements are implemented using finally blocks, ceval.c had to be tweaked to
distinguish between with finally blocks and normal ones.
A test for the finalization of generators containing with statements was also
added.
diff --git a/Misc/NEWS b/Misc/NEWS
index 6bb355b..9225c6f 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,9 @@
Core and Builtins
-----------------
+- Issue #7853: Normalize exceptions before they are passed to a context managers
+ __exit__ method.
+
- Issue #7385: Fix a crash in `MemoryView_FromObject` when
`PyObject_GetBuffer` fails. Patch by Florent Xicluna.