]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Update release notes for last additions to 5.1
authorBen Darnell <ben@bendarnell.com>
Mon, 11 Jun 2018 03:24:29 +0000 (23:24 -0400)
committerBen Darnell <ben@bendarnell.com>
Mon, 11 Jun 2018 03:24:29 +0000 (23:24 -0400)
docs/releases/v5.1.0.rst
tornado/httputil.py
tornado/options.py

index 7dd73feade8fafd6b70179456c9ad2cea666eeda..dc872e3bbc53493d0641ea75e87b87e82788d17a 100644 (file)
@@ -40,6 +40,14 @@ Deprecation notice
 - 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`
 ~~~~~~~~~~~~~~~~~~~~
 
@@ -69,10 +77,23 @@ Deprecation notice
 - `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.
@@ -86,6 +107,8 @@ Deprecation notice
   `~.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`
 ~~~~~~~~~~~~~~~~~~
@@ -96,6 +119,19 @@ Deprecation notice
   `.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`
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -125,6 +161,9 @@ Deprecation notice
 - 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.
@@ -135,6 +174,8 @@ Deprecation notice
 `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.
index eabe11b08a2f46e1642bd737e4e2ab60c19de2ba..3961446694f7817109dea9319a75b872ea48209b 100644 (file)
@@ -783,6 +783,11 @@ def parse_multipart_form_data(boundary, data, arguments, files):
     The ``boundary`` and ``data`` parameters are both byte strings.
     The dictionaries given in the arguments and files parameters
     will be updated with the contents of the body.
+
+    .. versionchanged:: 5.1
+
+       Now recognizes non-ASCII filenames in RFC 2231/5987
+       (``filename*=``) format.
     """
     # The standard allows for the boundary to be quoted in the header,
     # although it's rare (it happens at least for google app engine
index a269d44eba140169822332d6e3b4d4a2741c580c..0a4b965f1a40c31d5be14027d6b5c7afae99f9b0 100644 (file)
@@ -91,7 +91,6 @@ instances to define isolated sets of options, such as for subcommands.
    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
@@ -326,18 +325,20 @@ class OptionParser(object):
         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
@@ -358,6 +359,9 @@ class OptionParser(object):
            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: