]> granicus.if.org Git - python/commitdiff
bpo-30098: Clarify that run_coroutine_threadsafe expects asyncio.Future (GH-1170)
authorCharles Renwick <crenwick@users.noreply.github.com>
Fri, 21 Apr 2017 20:49:48 +0000 (16:49 -0400)
committerMariatta <Mariatta@users.noreply.github.com>
Fri, 21 Apr 2017 20:49:48 +0000 (13:49 -0700)
Lib/asyncio/tasks.py

index 4d79367d5cb600ea31fdfce5cbcd2a40c2e8aeeb..f91e70aecbad94ce7d0c2558e62cb3881b47903e 100644 (file)
@@ -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