From f74ef458ab1f502e4e60bd1502ac1dc0d2cb3847 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Fri, 15 Dec 2017 07:04:38 +0200 Subject: bpo-32311: Implement asyncio.create_task() shortcut (#4848) * Implement functionality * Add documentation --- Lib/asyncio/futures.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Lib/asyncio/futures.py') diff --git a/Lib/asyncio/futures.py b/Lib/asyncio/futures.py index d46a295197b..b310962f9fe 100644 --- a/Lib/asyncio/futures.py +++ b/Lib/asyncio/futures.py @@ -11,6 +11,7 @@ import sys from . import base_futures from . import events +from . import format_helpers CancelledError = base_futures.CancelledError @@ -79,7 +80,8 @@ class Future: self._loop = loop self._callbacks = [] if self._loop.get_debug(): - self._source_traceback = events.extract_stack(sys._getframe(1)) + self._source_traceback = format_helpers.extract_stack( + sys._getframe(1)) _repr_info = base_futures._future_repr_info -- cgit v1.2.3