]> granicus.if.org Git - python/commitdiff
bpo-30098: Clarify that run_coroutine_threadsafe expects asyncio.Future (GH-1170...
authorMariatta <Mariatta@users.noreply.github.com>
Sat, 22 Apr 2017 02:58:01 +0000 (19:58 -0700)
committerGitHub <noreply@github.com>
Sat, 22 Apr 2017 02:58:01 +0000 (19:58 -0700)
(cherry picked from commit ae5b3260dd459845aad8a30491b76d471577785d)

Lib/asyncio/tasks.py

index 7b3bdb21865a4910c802e75b304595141d3fe627..b6bd53cef1aa41abd462da3a3984f2e190b37480 100644 (file)
@@ -565,7 +565,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