devlib icon indicating copy to clipboard operation
devlib copied to clipboard

Remove nest_asyncio dependency

Open douglas-raillard-arm opened this issue 1 year ago • 1 comments

The author of nest_asyncio has passed away and the project is now abandoned: https://github.com/erdewit/nest_asyncio

Unfortunately, nest_asyncio in its current state does not support alternative event loops like uvloop, used by a number of project, e.g. the gunicorn WSGI server. According to this issue, the Python stdlib still does not have any plan on supporting nested event loop, but someone seems to have found a way to run an async function in synchronous world without an event loop at all: https://stackoverflow.com/questions/78170266/python-decorator-for-async-and-sync-function-without-code-duplication/78170267#78170267

I'll have a look tomorrow at that option and try to make a PR to remove the dependency

douglas-raillard-arm avatar Apr 25 '24 16:04 douglas-raillard-arm

Another possible avenue is: https://github.com/oremanj/greenback

douglas-raillard-arm avatar Apr 25 '24 16:04 douglas-raillard-arm