diff options
| author | Mariatta <Mariatta@users.noreply.github.com> | 2017-04-21 19:58:28 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-21 19:58:28 -0700 |
| commit | a3d8dda7d899bf41ab7eb2c6148459ad276fe295 (patch) | |
| tree | cd7ecefd4b1b4580838d54427ae890e0634117f7 | |
| parent | 414e0283a351e7b070c3f13aa24cadc5fdd9a230 (diff) | |
| download | cpython-git-a3d8dda7d899bf41ab7eb2c6148459ad276fe295.tar.gz | |
bpo-30098: Clarify that run_coroutine_threadsafe expects asyncio.Future (GH-1170) (#1247)
(cherry picked from commit ae5b3260dd459845aad8a30491b76d471577785d)
| -rw-r--r-- | Lib/asyncio/tasks.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py index 4d79367d5c..f91e70aecb 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 |
