[issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds
Gregory P. Smith
report at bugs.python.org
Wed Aug 21 19:32:08 EDT 2019
Gregory P. Smith <greg at krypto.org> added the comment:
The signal handler in this case is CPython's internal signal handling system thus any such onus falls on us...
The great signal handling hack of "set a flag that the interpreter loop checks on occasion" trick lasted a long time, but our VM has since evolved to be much more complicated than every bytecode being a safe interrupt point.
FYI - Most of the in-room conversation we tried to capture on this issue thread was at the core dev sprint a couple years ago (Sept 2017). It'll similarly take me a while to swap this context back in.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29988>
_______________________________________
More information about the Python-bugs-list
mailing list