agronholm / anyio

High level asynchronous concurrency and networking framework that works on top of either trio or asyncio
MIT License
1.82k stars 139 forks source link

Look into creating a shared subprocess implementation between backends #783

Open agronholm opened 2 months ago

agronholm commented 2 months ago

Things to check first

Feature description

We should take a stab at creating a more low-level subprocess implementation that only relies on a minimum set of functionality from each backend, just like the threading API.

Use case

Currently the asyncio subprocess API is a bit iffy from AnyIO's perspective. There are a lot of moving parts which we don't control, and cases where we use undocumented methods (StreamReader.set_exception() as an example). A new implementation, if possible, might make it easier to further develop the AnyIO subprocess APIs.