Lancetnik / FastDepends

FastDepends - FastAPI Dependency Injection system extracted from FastAPI and cleared of all HTTP logic. Async and sync modes are both supported.
https://lancetnik.github.io/FastDepends/
MIT License
244 stars 8 forks source link

Drop anyio requirement #102

Closed skewty closed 2 weeks ago

skewty commented 3 weeks ago

This project's usage of anyio seems minimal and could likely be avoided.

A basic TaskGroup could likely be recreated with minimal code yourself or worked around using asyncio.wait and asyncio already has thread pool executor.

Lancetnik commented 3 weeks ago

I am using anyio to be compatible with asyncio and trio runtimes both. I don't want to prefer any concrete to allow users choose by themselves

skewty commented 3 weeks ago

Fair point. What about making trio support an optional dependency (pip install fastdepends[trio]) and having the default code path be asyncio. If they choose trio support then anyio is installed.