bpo-30098: Clarify that run_coroutine_threadsafe expects asyncio.Future (GH-1170)

This commit is contained in:
Charles Renwick 2017-04-21 16:49:48 -04:00 committed by Mariatta
parent d1ae24e888
commit ae5b3260dd
1 changed files with 2 additions and 1 deletions

View File

@ -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