-
Notifications
You must be signed in to change notification settings - Fork 179
Description
Currently anyio's asyncio support relies on APIs like add_reader which are not guaranteed to be available, and in particular are not available when using the ProactorEventLoop on Windows.
Starting in 3.8, the ProactorEventLoop will be the default.
This isn't a big deal for programs that use anyio.run, because that can keep the old SelectorEventLoop default. But it's a big problem for libraries that use anyio internally, since they'll have to document that they don't work on Windows by default, and that anyone who wants to use them has to switch their whole program to a different event loop before they can use the library. That's going to be pretty awkward.
Tornado has a similar problem: tornadoweb/tornado#2608
The standard asyncio solution to this is to use the protocols/transports layer; that's the lowest-level layer that's guaranteed to be portable. anyio might have to figure out how to do that...