[issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds

Nick Coghlan report at bugs.python.org
Fri Sep 8 14:59:29 EDT 2017


Nick Coghlan added the comment:

I updated the PR at https://github.com/ncoghlan/cpython/pull/2/files with another attempt at reinstating the asynchronous CM test case that also tweaks the eval loop to ensure that the first few opcodes in a function are always executed before pending calls are checked.

This version highlights why I think asyncio really needs work before the async behaviour can be tested robustly in the standard library: it *hangs* somewhere in _asyncio.TaskStepMethWrapper once pending call handling is deferred long enough for the __aexit__ method to actually finish.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29988>
_______________________________________


More information about the Python-bugs-list mailing list