summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles Renwick <crenwick@users.noreply.github.com>2017-04-21 20:49:48 (GMT)
committerMariatta <Mariatta@users.noreply.github.com>2017-04-21 20:49:48 (GMT)
commitae5b3260dd459845aad8a30491b76d471577785d (patch)
treedb6cc6064a12d488430029df83e04e8e8189dcf0
parentd1ae24e8880fe00d006eb2996af815c35fbcfb33 (diff)
downloadcpython-ae5b3260dd459845aad8a30491b76d471577785d.zip
cpython-ae5b3260dd459845aad8a30491b76d471577785d.tar.gz
cpython-ae5b3260dd459845aad8a30491b76d471577785d.tar.bz2
bpo-30098: Clarify that run_coroutine_threadsafe expects asyncio.Future (GH-1170)
-rw-r--r--Lib/asyncio/tasks.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py
index 4d79367..f91e70a 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