Message286707
> 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). |
|
Date |
User |
Action |
Args |
2017-02-01 21:46:57 | yselivanov | set | recipients:
+ yselivanov, gvanrossum, docs@python, berker.peksag, Jeremy Bustamante |
2017-02-01 21:46:57 | yselivanov | set | messageid: <1485985617.34.0.102213112583.issue29344@psf.upfronthosting.co.za> |
2017-02-01 21:46:57 | yselivanov | link | issue29344 messages |
2017-02-01 21:46:57 | yselivanov | create | |
|