-
-
Notifications
You must be signed in to change notification settings - Fork 397
Description
Now that Python < 3.5 is not supported, the ipykernel project should be able to move away from the use of tornado coroutines to native async/await coroutines.
Is this on the radar for the project or is this not feasible? If this is in fact possible, is this planned for the short term and/or is anyone on the team working on this refactor?
As far as I can understand, the changes will essentially be updating tordano.gen.coroutine to async def functions and replace yield gen.future(...) statements in the coroutines with await .... It looks like the codebase also uses tornado.gen.sleep which can be replaced with asyncio.sleep. Please correct me if I am missing something non-trivial?
Note that I am not advocating for the removal of the dependence on tordano - simply the use of native coroutines over tornado coroutines.
Ref : https://github.com/tornadoweb/tornado/blob/5913aa43ecfdaa76876fc57867062227b907b1dd/tornado/gen.py#L5-L13 - for comment in the tornado.gen module regarding tornado coroutines and native async/await coroutines.