ARM-software / devlib

Library for interaction with and instrumentation of remote devices.
Apache License 2.0
47 stars 78 forks source link

Remove nest_asyncio dependency #682

Closed douglas-raillard-arm closed 2 months ago

douglas-raillard-arm commented 6 months ago

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 commented 6 months ago

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