Explicit support for trio #405
thearchitector
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
i see jinja's async mode also assumes asyncio, so perhaps that would have to be another disclaimer |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @thearchitector I welcome a PR. 👍🏼 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I think it would be neat for BlackSheep to explicitly support Trio as an underlying async engine. I say explicitly because, for the most part, it seems like it does (having played around running an app via hypercorn on trio-mode). There are just a few places, from a very brief search namely the http client and gzip middleware, where there are calls to the std asyncio module that fail; in the case of gzip, it's because
get_running_loop
has no running asyncio loop to return (the failure is what prompted this question).Are there any ideological reasons against adding support through a common interface like anyio? The only one that I can think of atm is the bulk of the added dependency for a few exceptions, but I'm not sure how one would do it with an optional dependency (unless perhaps, a disclaimer saying "if you want to use gzip or the http client, you need to install anyio as well").
If not, I'd be happy to put some time into a PR because I think this is a really cool project with designs i really agree with.
Beta Was this translation helpful? Give feedback.
All reactions