summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/tasks.py
diff options
context:
space:
mode:
authorMariatta <Mariatta@users.noreply.github.com>2017-04-22 02:58:28 (GMT)
committerGitHub <noreply@github.com>2017-04-22 02:58:28 (GMT)
commita3d8dda7d899bf41ab7eb2c6148459ad276fe295 (patch)
treecd7ecefd4b1b4580838d54427ae890e0634117f7 /Lib/asyncio/tasks.py
parent414e0283a351e7b070c3f13aa24cadc5fdd9a230 (diff)
downloadcpython-a3d8dda7d899bf41ab7eb2c6148459ad276fe295.zip
cpython-a3d8dda7d899bf41ab7eb2c6148459ad276fe295.tar.gz
cpython-a3d8dda7d899bf41ab7eb2c6148459ad276fe295.tar.bz2
bpo-30098: Clarify that run_coroutine_threadsafe expects asyncio.Future (GH-1170) (#1247)
(cherry picked from commit ae5b3260dd459845aad8a30491b76d471577785d)
Diffstat (limited to 'Lib/asyncio/tasks.py')
-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