Tornado 2.0 release candidate

301 views
Skip to first unread message

Ben Darnell

unread,
Jun 11, 2011, 10:22:36 PM6/11/11
to Tornado Mailing List
I'm planning to release Tornado 2.0 in the near future.  If you'd like to test a release candidate, check out the current source from github and give it a try.

Draft release notes:

Major changes:
* Template output is automatically escaped by default; see backwards
  compatibility note below.
* The default AsyncHTTPClient implementation is now simple_httpclient.
* Python 3.2 is now supported.

Backwards compatibility:
* Template autoescaping is enabled by default.  Applications upgrading from
  a previous release of Tornado must either disable autoescaping or adapt
  their templates to work with it.  For most applications, the simplest
  way to do this is to pass autoescape=None to the Application constructor.
* Applications that wish to continue using curl_httpclient instead of
  simple_httpclient may do so by calling
    AsyncHTTPClient.configure("tornado.curl_httpclient.CurlAsyncHTTPClient")
  at the beginning of the process.
* Python 3 compatibility involved many changes throughout the codebase,
  so users are encouraged to test their applications more thoroughly than
  usual when upgrading to this release.

Other changes in this release:
* Templates support several new directives:
  - {% autoescape ...%} to control escaping behavior
  - {% raw ... %} for unescaped output
  - {% module ... %} for calling UIModules
* {% module Template(path, **kwargs) %} may now be used to call another
  template with an independent namespace
* All IOStream callbacks are now run directly on the IOLoop via add_callback.
* HTTPServer now supports IPv6 where available.  To disable, pass
  family=socket.AF_INET to HTTPServer.bind().
* HTTPClient now supports IPv6 if the request has allow_ipv6=True
* RequestHandlers can use an encoding other than utf-8 for query parameters
  by overriding decode_argument()
* Performance improvements, especially for applications that use a lot of
  IOLoop timeouts
* HTTP OPTIONS method no longer requires an XSRF token.
* JSON output (RequestHandler.write(dict)) now sets Content-Type to
  application/json
* Etag computation can now be customized or disabled by overriding
  RequestHandler.compute_etag
* USE_SIMPLE_HTTPCLIENT environment variable is no longer supported.
  Use AsyncHTTPClient.configure instead.

Frank Smit

unread,
Jun 12, 2011, 4:55:05 AM6/12/11
to python-...@googlegroups.com
When I install Tornado from git I get this: http://pastebin.com/RArvEphk

I tried to install it in a Virtualenv environment. Do I need to do
anything before I install it?

HENG

unread,
Jun 12, 2011, 5:26:27 AM6/12/11
to python-...@googlegroups.com
Good job! Waiting for 2.0

2011/6/12 Frank Smit <fr...@61924.nl>



--
--------------------------------------------------------------------
HengZhou
---------------------------------------------------------------------
--

Johan Andersson

unread,
Jun 12, 2011, 7:37:25 AM6/12/11
to python-...@googlegroups.com
On Sat, Jun 11, 2011 at 07:22:36PM -0700, Ben Darnell wrote:
> I'm planning to release Tornado 2.0 in the near future. If you'd like to
> test a release candidate, check out the current source from github and give
> it a try.
>
> Draft release notes:
>
> Major changes:
> * Template output is automatically escaped by default; see backwards
> compatibility note below.
> * The default AsyncHTTPClient implementation is now simple_httpclient.
> * Python 3.2 is now supported.
>

What is the pros and cons about using python 3.x over 2.x ?

--
Johan Andersson

Ben Darnell

unread,
Jun 12, 2011, 1:14:07 PM6/12/11
to python-...@googlegroups.com
Hmm.. The 2to3 converter isn't getting run automatically, but you're also not getting stopped by the setuptools import in setup.py.  You need the "distribute" package installed, but virtualenv does that automatically for me.  Which version of virtualenv are you using?

Try removing the "build" directory - I've seen it get confused by old files there.  

-Ben

Ben Darnell

unread,
Jun 12, 2011, 1:41:56 PM6/12/11
to python-...@googlegroups.com
http://wiki.python.org/moin/Python2orPython3

My answer is that if you're uncertain, you should probably use 2.x.  The vast majority of third-party python software is currently 2.x-only.  Some things are a little cleaner in 3.x, but there are still some rough edges even in 3.2.  

-Ben

Frank Smit

unread,
Jun 12, 2011, 2:05:32 PM6/12/11
to python-...@googlegroups.com
I'm using Virtualenv 1.6.1. I figured out that I needed to run 2to3
and it worked. It had to do with the build directory as you said.

Ben Darnell

unread,
Jun 12, 2011, 2:09:02 PM6/12/11
to python-...@googlegroups.com
You mean you had to run 2to3 manually, or that it ran automatically after you deleted the build directory?  setup.py should be running 2to3 for you.

-Ben

Frank Smit

unread,
Jun 12, 2011, 4:42:49 PM6/12/11
to python-...@googlegroups.com
It worked after I removed the build directory.
Reply all
Reply to author
Forward
0 new messages