Skip to content

Commit

Permalink
bpo-30098: Clarify that run_coroutine_threadsafe expects asyncio.Futu…
Browse files Browse the repository at this point in the history
  • Loading branch information
crenwick authored and Mariatta committed Apr 21, 2017
1 parent d1ae24e commit ae5b326
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lib/asyncio/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ae5b326

Please sign in to comment.