[docs] [issue29344] sock_recv not detected a coroutine
Yury Selivanov
report at bugs.python.org
Wed Feb 1 16:46:57 EST 2017
Yury Selivanov added the comment:
> Maybe we should switch all these to "awaitable"?
I like this! Would it be OK to add a new sphinx declaration? So that:
.. coroutinemethod:: AbstractEventLoop.shutdown_asyncgens()
would become:
.. awaitable:: AbstractEventLoop.shutdown_asyncgens()
?
> Also note that in proactor_events.py, sock_connect() is *not* a coroutine.
Yeah, those small incompatibilities are inevitable for asyncio programs/frameworks -- something that returns a Future may occasionally become a coroutine. Your idea to document API methods as "awaitables" seems to be the right way to go.
> In fact I'm not sure what it is -- it calls self._proactor.connect() which appears to return None from the code in windows_events.py. That's presumably a separate bug.
It looks like it returns the result of "IocpProactor.connect()" call, which returns an _OverlappedFuture instance (I don't really know Windows part of asyncio code, so I might be missing something).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29344>
_______________________________________
More information about the docs
mailing list