Support hypercorn and Trio? #184
Replies: 3 comments
-
Interesting. I can well imagine to add a hypercorn argument to |
Beta Was this translation helpful? Give feedback.
-
Has this been tried by someone? I had the luxury of being able to work exclusively with trio in the past, and got accustomed to expect clear and understandable behaviour. When I had a library like the MongoDB async driver, I was still able to work around with trio_asyncio, but got accustomed to silent swallowing of exceptions, behaviour after leaving a scope and things like that. Now, I'm a happy user of nicegui and since my libraries are all written in anyio, I decided to just run everything under asyncio, hoping to avoid some of the trio_asyncio hassles. However, now that I have an application combining three asyncio-native libaries (nicegui via uvicorn, MongoDB driver, and bleak), asyncio really showed it's teeth. I have completely unpredictable behaviour, probably some silent failure and I wish I had a trio loop. I'd be willing to do some legwork here if there is hope that this succeeds... |
Beta Was this translation helpful? Give feedback.
-
@burnpanck thanks for your willingness to contribute. From the FastAPI docs:
So a good first task would be a pull request which ensures that NiceGUI also uses AnyIO. |
Beta Was this translation helpful? Give feedback.
-
I would like to use NiceGUI with Trio instead of asyncio. This means implementing hypercorn in addition to uvicorn, because the latter does not plan to support Trio
Beta Was this translation helpful? Give feedback.
All reactions