Tornado 4.5 and 5.0 plans

304 views
Skip to first unread message

Ben Darnell

unread,
Feb 20, 2017, 10:59:30 PM2/20/17
to Tornado Mailing List
It's been about 6 months since Tornado 4.4, so it's about time for a new release. I'm going through the PR/issue backlog now to merge anything that looks ready to go. (if you've got an older issue that you'd like to get considered, feel free to add a comment to bring it to my attention). This will become Tornado 4.5 in a few weeks.

After 4.5, I intend to make a number of changes aimed at bringing Tornado and asyncio closer together: 
1) Use the asyncio event loop by default on python 3 (deprecating the ability to configure different IOLoop implementations)
2) Change the semantics of IOLoop.current() and IOLoop.instance() to match asyncio.get_event_loop()
3) Use the asyncio coroutine runner instead of tornado.gen.coroutine for `async def` functions
4) Deprecate things that don't work with native coroutines, specifically stack_context and convert_yielded.register()
These changes are potentially backwards-incompatible, so they will become Tornado 5.0 (and schedule permitting, this will come relatively soon after 4.5). 

-Ben

Aliane Abdenour Abdelouahab

unread,
Feb 21, 2017, 8:02:18 AM2/21/17
to python-...@googlegroups.com
Hi,

Amazing new, could you please add something like this to the docs ? so new comers could know how to use the new Tornado, because the problem about internet documentation and tutorials, is that they are not updated, so if a new user, or a user that dident worked with Tornado for a while, comes, he will get some difficulties to migrate, so I think it would be better to make it as a section ?

--
You received this message because you are subscribed to the Google Groups "Tornado Web Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-tornado+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sans titre.png

Antoine Pitrou

unread,
Feb 21, 2017, 8:40:41 AM2/21/17
to python-...@googlegroups.com

Hi Ben,

On Tue, 21 Feb 2017 03:59:14 +0000
Ben Darnell <b...@bendarnell.com> wrote:
> It's been about 6 months since Tornado 4.4, so it's about time for a new
> release. I'm going through the PR/issue backlog now to merge anything that
> looks ready to go. (if you've got an older issue that you'd like to get
> considered, feel free to add a comment to bring it to my attention). This
> will become Tornado 4.5 in a few weeks.
>
> After 4.5, I intend to make a number of changes aimed at bringing Tornado
> and asyncio closer together:
> 1) Use the asyncio event loop by default on python 3 (deprecating the
> ability to configure different IOLoop implementations)

It would be nice if you could announce that early enough so that we can
start testing the development version of Tornado and confirm that this
doesn't break anything on our end.

About "deprecating the ability to configure different IOLoop
implementations", what do you mean exactly? For example, pyzmq needs
to set up its own event loop for use in non-blocking Tornado
applications.

> 2) Change the semantics of IOLoop.current() and IOLoop.instance() to match
> asyncio.get_event_loop()

Also an announcement and call for testing would be nice for this as
well.

Best regards

Antoine.


Ben Darnell

unread,
Feb 21, 2017, 9:22:10 AM2/21/17
to python-...@googlegroups.com
On Tue, Feb 21, 2017 at 8:40 AM Antoine Pitrou <soli...@pitrou.net> wrote:
> After 4.5, I intend to make a number of changes aimed at bringing Tornado
> and asyncio closer together:
> 1) Use the asyncio event loop by default on python 3 (deprecating the
> ability to configure different IOLoop implementations)

It would be nice if you could announce that early enough so that we can
start testing the development version of Tornado and confirm that this
doesn't break anything on our end.

Yes, this will get plenty of testing time.
 

About "deprecating the ability to configure different IOLoop
implementations", what do you mean exactly?  For example, pyzmq needs
to set up its own event loop for use in non-blocking Tornado
applications.

The idea is that when asyncio is available, you should use `asyncio.set_event_loop{,_policy}()` instead of configuring things on the Tornado side. But we'll continue to support IOLoop.{configure,install}, at least for python2. I haven't figured out yet how we'll reconcile the two. 

-Ben
 

> 2) Change the semantics of IOLoop.current() and IOLoop.instance() to match
> asyncio.get_event_loop()

Also an announcement and call for testing would be nice for this as
well.

Best regards

Antoine.


--
You received this message because you are subscribed to the Google Groups "Tornado Web Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-tornad...@googlegroups.com.

MinRK

unread,
Feb 21, 2017, 10:59:35 AM2/21/17
to python-...@googlegroups.com

On Tue, Feb 21, 2017 at 3:21 PM, Ben Darnell <b...@bendarnell.com> wrote:

On Tue, Feb 21, 2017 at 8:40 AM Antoine Pitrou <soli...@pitrou.net> wrote:
> After 4.5, I intend to make a number of changes aimed at bringing Tornado
> and asyncio closer together:
> 1) Use the asyncio event loop by default on python 3 (deprecating the
> ability to configure different IOLoop implementations)

It would be nice if you could announce that early enough so that we can
start testing the development version of Tornado and confirm that this
doesn't break anything on our end.

Yes, this will get plenty of testing time.
 

About "deprecating the ability to configure different IOLoop
implementations", what do you mean exactly?  For example, pyzmq needs
to set up its own event loop for use in non-blocking Tornado
applications.

The idea is that when asyncio is available, you should use `asyncio.set_event_loop{,_policy}()` instead of configuring things on the Tornado side. But we'll continue to support IOLoop.{configure,install}, at least for python2. I haven't figured out yet how we'll reconcile the two. 

pyzmq can do the equivalent for asyncio already, so I think should be okay (zmq.asyncio.install()). Mainly a matter of updating applications and documentation to follow. I haven’t tested zmq on top of tornado on top of asyncio on top of zmq yet, though.

-Min


-Ben
 

> 2) Change the semantics of IOLoop.current() and IOLoop.instance() to match
> asyncio.get_event_loop()

Also an announcement and call for testing would be nice for this as
well.

Best regards

Antoine.


--
You received this message because you are subscribed to the Google Groups "Tornado Web Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-tornado+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Tornado Web Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-tornado+unsubscribe@googlegroups.com.

Michael DePalatis

unread,
Feb 21, 2017, 10:41:47 PM2/21/17
to Tornado Web Server, b...@bendarnell.com
Hi Ben,

These goals for 5.0 all sound great. As always, thank you for your great work on Tornado!

- Mike

TaoBeier

unread,
Feb 22, 2017, 9:19:37 PM2/22/17
to Tornado Web Server, b...@bendarnell.com
So great! And I want to know, is there has a plan to change the default behavior of Python 2?
Although we also started using the Python 3.

在 2017年2月21日星期二 UTC+8上午11:59:30,Ben Darnell写道:

Ben Darnell

unread,
Feb 22, 2017, 9:51:52 PM2/22/17
to TaoBeier, Tornado Web Server
I'm not sure yet. Python 2 obviously can't use the asyncio event loop by default, so it will still have the existing IOLoop and configure() method. I might make some changes to current() and instance() to match the behavior on the Python 3 side (instance() will probably be deprecated).

Sam carman

unread,
Feb 25, 2017, 5:12:17 AM2/25/17
to Tornado Web Server, b...@bendarnell.com
Hey ben:
  I have a question, The tornado 4.5+ no sure python 2.x  with maintain yet?

在 2017年2月21日星期二 UTC+8上午11:59:30,Ben Darnell写道:
It's been about 6 months since Tornado 4.4, so it's about time for a new release. I'm going through the PR/issue backlog now to merge anything that looks ready to go. (if you've got an older issue that you'd like to get considered, feel free to add a comment to bring it to my attention). This will become Tornado 4.5 in a few weeks.

Ben Darnell

unread,
Feb 25, 2017, 11:29:27 AM2/25/17
to Sam carman, Tornado Web Server
Tornado 4.5 and 5.0 will support both python 2 and python 3. I think we're still a few years away from dropping python 2. 

Phyo Arkar

unread,
Feb 25, 2017, 12:00:19 PM2/25/17
to Sam carman, Tornado Web Server
Ben , very good news that you are going to focus back on Tornado and pushing forwards 5.x! 
We are enjoying it alot! Also going to contribute on it during april , since I will free abit.



--
You received this message because you are subscribed to the Google Groups "Tornado Web Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-tornad...@googlegroups.com.

Sam carman

unread,
Feb 26, 2017, 12:40:26 AM2/26/17
to Tornado Web Server, pypsuit...@gmail.com, b...@bendarnell.com
thx, Your answer

在 2017年2月26日星期日 UTC+8上午12:29:27,Ben Darnell写道:
Reply all
Reply to author
Forward
0 new messages