From: Mariatta Date: Sat, 22 Apr 2017 02:58:28 +0000 (-0700) Subject: bpo-30098: Clarify that run_coroutine_threadsafe expects asyncio.Future (GH-1170... X-Git-Tag: v3.6.2rc1~206 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a3d8dda7d899bf41ab7eb2c6148459ad276fe295;p=python bpo-30098: Clarify that run_coroutine_threadsafe expects asyncio.Future (GH-1170) (#1247) (cherry picked from commit ae5b3260dd459845aad8a30491b76d471577785d) --- diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py index 4d79367d5c..f91e70aecb 100644 --- a/Lib/asyncio/tasks.py +++ b/Lib/asyncio/tasks.py @@ -517,7 +517,8 @@ def ensure_future(coro_or_future, *, loop=None): elif compat.PY35 and inspect.isawaitable(coro_or_future): return ensure_future(_wrap_awaitable(coro_or_future), loop=loop) else: - raise TypeError('A Future, a coroutine or an awaitable is required') + raise TypeError('An asyncio.Future, a coroutine or an awaitable is ' + 'required') @coroutine