From: Yury Selivanov Date: Tue, 12 May 2015 15:43:35 +0000 (-0400) Subject: asyncio: Make sure sys.set_coroutine_wrapper is called *only* when loop is running. X-Git-Tag: v3.5.0b1~187 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=08a7a4e5926392e2d7247bb3536032dc48781280;p=thirdparty%2FPython%2Fcpython.git asyncio: Make sure sys.set_coroutine_wrapper is called *only* when loop is running. Previous approach of installing coroutine wrapper in loop.set_debug() and uninstalling it in loop.close() was very fragile. Most of asyncio tests do not call loop.close() at all. Since coroutine wrapper is a global setting, we have to make sure that it's only set when the loop is running, and is automatically unset when it stops running. Issue #24017. --- 08a7a4e5926392e2d7247bb3536032dc48781280