Issue 30539: Make Proactor public in asyncio.ProactorEventLoop (original) (raw)

Issue30539

Created on 2017-06-01 13:59 by jabdoa, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg294939 - (view) Author: (jabdoa) Date: 2017-06-01 13:59
pyserial-asyncio cannot use IOCP for serial sockets on windows because _proactor is private on the ProactorEventLoop. Can it be made public? Currently, pyserial-asyncio has to rely on polling for windows which is suboptimal. Some forks use Proactor (e.g. https://github.com/m-labs/asyncserial/blob/master/asyncserial/asyncserial.py#L172) but it would be nice to use a stable API in official pyserial-asyncio. Issue for this is here: https://github.com/pyserial/pyserial-asyncio/issues/3
msg308796 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2017-12-20 20:00
asyncio doesn't expose `loop.selector` and `loop.proactor` -- it is deliberate choice. What proactor methods are needed to serial support? Maybe we can incorporate them into event loop itself -- as we did for `loop.sock_*`?
msg308798 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2017-12-20 20:04
Big -1 from me. If proactor is public, alternative event loop implementations like uvloop will have to implement its full API, which actually puts restrictions on us refactoring asyncio itself. If there's some missing functionality we should think about adding new specific APIs for it, and not exposing internals. I'm closing this issue, but please feel free to open a new one requesting to implement whatever pyserial-asyncio implements in asyncio itself.
History
Date User Action Args
2022-04-11 14:58:47 admin set github: 74724
2017-12-20 20:04:21 yselivanov set status: open -> closedresolution: rejectedmessages: + stage: resolved
2017-12-20 20:00:01 asvetlov set nosy: + asvetlovmessages: +
2017-06-01 13:59:06 jabdoa create