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 --- Include/warnings.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Include/warnings.h') diff --git a/Include/warnings.h b/Include/warnings.h index a3f83ff696..a675bb5dfc 100644 --- a/Include/warnings.h +++ b/Include/warnings.h @@ -56,6 +56,10 @@ PyErr_WarnExplicitFormat(PyObject *category, #define PyErr_Warn(category, msg) PyErr_WarnEx(category, msg, 1) #endif +#ifndef Py_LIMITED_API +void _PyErr_WarnUnawaitedCoroutine(PyObject *coro); +#endif + #ifdef __cplusplus } #endif -- cgit v1.2.1