summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorMariatta <Mariatta@users.noreply.github.com>2017-04-22 02:58:01 (GMT)
committerGitHub <noreply@github.com>2017-04-22 02:58:01 (GMT)
commit503d74a60aa9290cf8d174eab95fdfdea1f2b284 (patch)
treede4a628e0afbcd35cdd8ceffd31c44b599cb7656 /Lib/asyncio
parent17db4b99b4d300a9b024ba0efdaa46d05d4f4cd3 (diff)
downloadcpython-503d74a60aa9290cf8d174eab95fdfdea1f2b284.zip
cpython-503d74a60aa9290cf8d174eab95fdfdea1f2b284.tar.gz
cpython-503d74a60aa9290cf8d174eab95fdfdea1f2b284.tar.bz2
bpo-30098: Clarify that run_coroutine_threadsafe expects asyncio.Future (GH-1170) (#1246)
(cherry picked from commit ae5b3260dd459845aad8a30491b76d471577785d)
Diffstat (limited to 'Lib/asyncio')
-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 7b3bdb2..b6bd53c 100644
--- a/Lib/asyncio/tasks.py
+++ b/Lib/asyncio/tasks.py
@@ -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