This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Make Proactor public in asyncio.ProactorEventLoop
Type: Stage: resolved
Components: asyncio Versions: Python 3.7, Python 3.6, Python 3.3, Python 3.4, Python 3.5
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, jabdoa, yselivanov
Priority: normal Keywords:

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:47adminsetgithub: 74724
2017-12-20 20:04:21yselivanovsetstatus: open -> closed
resolution: rejected
messages: + msg308798

stage: resolved
2017-12-20 20:00:01asvetlovsetnosy: + asvetlov
messages: + msg308796
2017-06-01 13:59:06jabdoacreate