From fc2f407829d9817ddacccae6944dd0879cfaca24 Mon Sep 17 00:00:00 2001 From: "Nathaniel J. Smith" Date: Sun, 21 Jan 2018 06:44:07 -0800 Subject: bpo-32591: Add native coroutine origin tracking (#5250) * Add coro.cr_origin and sys.set_coroutine_origin_tracking_depth * Use coroutine origin information in the unawaited coroutine warning * Stop using set_coroutine_wrapper in asyncio debug mode * In BaseEventLoop.set_debug, enable debugging in the correct thread --- Python/pystate.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Python/pystate.c') diff --git a/Python/pystate.c b/Python/pystate.c index 028292e42f..9c25a26460 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -305,6 +305,8 @@ new_threadstate(PyInterpreterState *interp, int init) tstate->on_delete = NULL; tstate->on_delete_data = NULL; + tstate->coroutine_origin_tracking_depth = 0; + tstate->coroutine_wrapper = NULL; tstate->in_coroutine_wrapper = 0; -- cgit v1.2.1