Irit Katriel <[email protected]> added the comment:
The leak seems to be due to the nested definitions of the Exception types A and
B. It goes away if I move them out of the function so that it's like:
class A(Exception):
pass
class B(Exception):
pass
def test_no_hang_on_context_chain_cycle2():
try:
try:
raise A()
except A as _a:
a = _a
try:
raise B()
except B as _b:
b = _b
raise b
except B:
pass
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue44895>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com