New submission from Jack O'Connor: The following hangs at 100% CPU on Python 3.5, though not on Python 3.4:
1) Start an asyncio coroutine with run_until_complete(). 2) Inside the coroutine, enter an ExitStack using a with-statement. 3) Inside the with-statement, call ExitStack.enter_context() with a generator context manager. It doesn't matter what the generator yields. 4) After the enter_context() call, raise an exception. Here's an example script that does all of this and repros the hang: https://gist.github.com/oconnor663/483db2820bb5f877c9ed ---------- components: asyncio messages: 255719 nosy: gvanrossum, haypo, oconnor663, yselivanov priority: normal severity: normal status: open title: deadlock with asyncio+contextmanager+ExitStack type: behavior versions: Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25779> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com