Move from tornado.gen to native coroutines ?
See original GitHub issuetornado docs
for tornado.gen
say:
The “decorator and generator” approach in this module is a precursor to native coroutines (using async def and await) which were introduced in Python 3.5. Applications that do not require compatibility with older versions of Python should use native coroutines instead
With the dropping of support for python<3.5
, are we going to move to native coroutines and asyncio
?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Coroutines — Tornado 6.2 documentation
Use tornado.gen.multi to do this in native coroutines. ... it is important to call coroutines in the right way, or you may have...
Read more >migrate @gen.coroutine AsyncHTTPClient and Motor to native ...
I'm working with latests Tornadoweb 4.4.1 and python 3.5 and motor '0.6.2'. I'm intensively use tornado.curl_httpclient.CurlAsyncHTTPClient and Motor Mondodb ...
Read more >Coroutines — Tornado 4.5.dev1 documentation
Coroutines ¶. Coroutines are the recommended way to write asynchronous code in Tornado. Coroutines use the Python yield keyword to suspend and resume ......
Read more >tornado.gen — Simplify asynchronous code
pauses the coroutine until both future1 and future2 return, and then restarts the coroutine with the results of both futures. If either future...
Read more >Advantages of Tornado's coroutines compared to native ...
Starting in Tornado 4.3, you can use them in place of yield-based coroutines. Simply use async def foo() in place of a function...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We already upgraded the code base in https://github.com/bokeh/bokeh/tree/bryanv/async. The problem currently is with updating tests, as described in https://github.com/bokeh/bokeh/issues/9098#issuecomment-513501421. Help with that would be very welcome.
btw (just randomly stumbled upon this on a google search) but i made a codemod for the coroutine -> async upgrade: https://github.com/zhammer/tornado-async-transformer. happy to try running that over some code here when ready to upgrade