- The ``OAuthMixin._oauth_get_user`` method is deprecated and will be removed in
6.0. Override `~.OAuthMixin._oauth_get_user_future` instead.
+`tornado.autoreload`
+~~~~~~~~~~~~~~~~~~~~
+
+- The command-line autoreload wrapper is now preserved if an internal
+ autoreload fires.
+- The command-line wrapper no longer starts duplicated processes on windows
+ when combined with internal autoreload.
+
`tornado.concurrent`
~~~~~~~~~~~~~~~~~~~~
- `tornado.httpclient.HTTPError` has been renamed to
`.HTTPClientError` to avoid ambiguity in code that also has to deal
with `tornado.web.HTTPError`. The old name remains as an alias.
+- ``tornado.curl_httpclient`` now supports non-ASCII characters in
+ username and password arguments.
+- ``.HTTPResponse.request_time`` now behaves consistently across
+ ``simple_httpclient`` and ``curl_httpclient``, excluding time spent
+ in the ``max_clients`` queue in both cases (previously this time was
+ included in ``simple_httpclient`` but excluded in
+ ``curl_httpclient``). In both cases the time is now computed using
+ a monotonic clock where available.
+- `.HTTPResponse` now has a ``start_time`` attribute recording a
+ wall-clock (`time.time`) timestamp at which the request started
+ (after leaving the ``max_clients`` queue if applicable).
`tornado.httputil`
~~~~~~~~~~~~~~~~~~
+- `.parse_multipart_form_data` now recognizes non-ASCII filenames in
+ RFC 2231/5987 (``filename*=``) format.
- `.HTTPServerRequest.write` is deprecated and will be removed in 6.0. Use
the methods of ``request.connection`` instead.
- Malformed HTTP headers are now logged less noisily.
`~.IOLoop.set_blocking_log_threshold`, `~.IOLoop.log_stack`,
and `.IOLoop.handle_callback_exception` are deprecated and will
be removed in 6.0.
+- Fixed a `KeyError` in `.IOLoop.close` when `.IOLoop` objects are
+ being opened and closed in multiple threads.
`tornado.iostream`
~~~~~~~~~~~~~~~~~~
`.BaseIOStream.read_until_close` are deprecated and will be removed
in 6.0.
+`tornado.netutil`
+~~~~~~~~~~~~~~~~~
+
+- Improved compatibility with GNU Hurd.
+
+`tornado.options`
+~~~~~~~~~~~~~~~~~
+
+- `tornado.options.parse_config_file` now allows setting options to
+ strings (which will be parsed the same way as
+ `tornado.options.parse_command_line`) in addition to the specified
+ type for the option.
+
`tornado.platform.twisted`
~~~~~~~~~~~~~~~~~~~~~~~~~~
- New method `.RequestHandler.detach` can be used from methods
that are not decorated with ``@asynchronous`` (the decorator
was required to use ``self.request.connection.detach()``.
+- `.RequestHandler.finish` and `.RequestHandler.render` now return
+ ``Futures`` that can be used to wait for the last part of the
+ response to be sent to the client.
- `.FallbackHandler` now calls ``on_finish`` for the benefit of
subclasses that may have overridden it.
- The `.asynchronous` decorator is deprecated and will be removed in 6.0.
`tornado.websocket`
~~~~~~~~~~~~~~~~~~~
+- When compression is enabled, memory limits now apply to the
+ post-decompression size of the data, protecting against DoS attacks.
- `.websocket_connect` now supports subprotocols.
- `.WebSocketHandler` and `.WebSocketClientConnection` now have
``selected_subprotocol`` attributes to see the subprotocol in use.
options can be defined, set, and read with any mix of the two.
Dashes are typical for command-line usage while config files require
underscores.
-
"""
from __future__ import absolute_import, division, print_function
the global namespace that matches a defined option will be
used to set that option's value.
- Options are not parsed from strings as they would be on the
- command line; they should be set to the correct type (this
- means if you have ``datetime`` or ``timedelta`` options you
- will need to import those modules in the config file.
+ Options may either be the specified type for the option or
+ strings (in which case they will be parsed the same way as in
+ `.parse_command_line`)
Example (using the options defined in the top-level docs of
this module)::
port = 80
mysql_host = 'mydb.example.com:3306'
+ # Both lists and comma-separated strings are allowed for
+ # multiple=True.
memcache_hosts = ['cache1.example.com:11011',
'cache2.example.com:11011']
+ memcache_hosts = 'cache1.example.com:11011,cache2.example.com:11011'
If ``final`` is ``False``, parse callbacks will not be run.
This is useful for applications that wish to combine configurations
The special variable ``__file__`` is available inside config
files, specifying the absolute path to the config file itself.
+ .. versionchanged:: 5.1
+ Added the ability to set options via strings in config files.
+
"""
config = {'__file__': os.path.abspath(path)}
with open(path, 'rb') as f: