Skip to content

Commit 503d74a

Browse files
authored
bpo-30098: Clarify that run_coroutine_threadsafe expects asyncio.Future (GH-1170) (#1246)
(cherry picked from commit ae5b326)
1 parent 17db4b9 commit 503d74a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/asyncio/tasks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,8 @@ def ensure_future(coro_or_future, *, loop=None):
565565
elif compat.PY35 and inspect.isawaitable(coro_or_future):
566566
return ensure_future(_wrap_awaitable(coro_or_future), loop=loop)
567567
else:
568-
raise TypeError('A Future, a coroutine or an awaitable is required')
568+
raise TypeError('An asyncio.Future, a coroutine or an awaitable is '
569+
'required')
569570

570571

571572
@coroutine

0 commit comments

Comments
 (0)