What’s new in Tornado 2.3¶
May 31, 2012¶
tornado.httpclient.HTTPClientnow supports the same constructor keyword arguments as
max_clientskeyword argument to
tornado.simple_httpclientnow supports the
tornado.simple_httpclientis better about closing its sockets instead of leaving them for garbage collection.
tornado.simple_httpclientcorrectly verifies SSL certificates for URLs containing IPv6 literals (This bug affected Python 2.5 and 2.6).
tornado.simple_httpclientno longer includes basic auth credentials in the
Hostheader when those credentials are extracted from the URL.
tornado.simple_httpclientno longer modifies the caller-supplied header dictionary, which caused problems when following redirects.
tornado.curl_httpclientnow supports client SSL certificates (using the same
HTTPServernow works correctly with paths starting with
dict.copy) now works correctly.
HTTPConnection.addressis now always the socket address, even for non-IP sockets.
HTTPRequest.remote_ipis still always an IP-style address (fake data is used for non-IP sockets)
Extra data at the end of multipart form bodies is now ignored, which fixes a compatibility problem with an iOS HTTP client library.
IOStreamnow has an
errorattribute that can be used to determine why a socket was closed.
read_until_regexare much faster with large input.
IOStream.writeperforms better when given very large strings.
IOLoop.instance()is now thread-safe.
multiple=Truethat are set more than once now overwrite rather than append. This makes it possible to override values set in
--helpoutput is now prettier.
tornado.options.optionsnow supports attribute assignment.
Template files containing non-ASCII (utf8) characters now work on Python 3 regardless of the locale environment variables.
Templates now support
tornado.web.RequestHandlernow supports the
PATCHHTTP method. Note that this means any existing methods named
RequestHandlersubclasses will need to be renamed.
removeslashdecorators now send permanent redirects (301) instead of temporary (302).
RequestHandler.flushnow invokes its callback whether there was any data to flush or not.
Repeated calls to
RequestHandler.set_cookiewith the same name now overwrite the previous cookie instead of producing additional copies.
tornado.web.OutputTransform.transform_first_chunknow takes and returns a status code in addition to the headers and chunk. This is a backwards-incompatible change to an interface that was never technically private, but was not included in the documentation and does not appear to have been used outside Tornado itself.
Fixed a bug on python versions before 2.6.5 when
tornado.web.URLSpecregexes are constructed from unicode strings and keyword arguments are extracted.
reverse_urlfunction in the template namespace now comes from the
RequestHandlerrather than the
Application. (Unless overridden,
RequestHandler.reverse_urlis just an alias for the
Etagheader is now returned on 304 responses to an
If-None-Matchrequest, improving compatibility with some caches.
tornado.webwill no longer produce responses with status code 304 that also have entity headers such as
tornado.auth.FacebookGraphMixinno longer sends
post_argsredundantly in the url.
tornado.escape.linkifymay now be a callable, to allow parameters to be chosen separately for each link.
tornado.genno longer leaks
@gen.enginewrapped function is called repeatedly.
tornado.locale.get_supported_localesno longer takes a meaningless
StackContextinstances now have a deactivation callback that can be used to prevent further propagation.
tornado.testing.AsyncTestCase.waitnow resets its timeout on each call.
tornado.wsgi.WSGIApplicationnow parses arguments correctly on Python 3.
Exception handling on Python 3 has been improved; previously some exceptions such as