]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Update next-release notes.
authorBen Darnell <ben@bendarnell.com>
Mon, 4 Nov 2013 02:10:56 +0000 (21:10 -0500)
committerBen Darnell <ben@bendarnell.com>
Mon, 4 Nov 2013 02:10:56 +0000 (21:10 -0500)
docs/releases/next.rst
docs/web.rst
docs/websocket.rst
tornado/gen.py
tornado/httpserver.py
tornado/web.py
tornado/websocket.py

index f64a0289cd135d537e5a774558e2937a96591a2d..0a4638ea332bad16c7599f9c43f517e497e16cee 100644 (file)
@@ -31,4 +31,42 @@ In Progress
   arguments, just like `~.RequestHandler.clear_cookie`.
 * The embedded ``ca-certificats.crt`` file has been updated with the current
   Mozilla CA list.
-* `.GoogleOAuth2Mixin` has been added so that Google's OAuth2 only apps are able to get a context without OpenID (which uses OAuth 1).
+* `.GoogleOAuth2Mixin` has been added so that Google's OAuth2 only apps are
+  able to get a context without OpenID (which uses OAuth 1).
+* `.WebSocketHandler.write_message` now raises `.WebSocketClosedError` instead
+  of `AttributeError` when the connection has been closed.
+* ``simple_httpclient`` now applies the ``connect_timeout`` to requests
+  that are queued and have not yet started.
+* `.is_valid_ip` (and therefore ``HTTPRequest.remote_ip``) now rejects
+  empty strings.
+* `.websocket_connect` now accepts preconstructed ``HTTPRequest`` objects.
+* Fix a bug with `.WebSocketHandler` when used with some proxies that
+  unconditionally modify the ``Connection`` header.
+* New application setting ``default_handler_class`` can be used to easily
+  set up custom 404 pages.
+* Fix some error messages for unix sockets (and other non-IP sockets)
+* New application settings ``autoreload``, ``compiled_template_cache``,
+  ``static_hash_cache``, and ``serve_traceback`` can be used to control
+  individual aspects of debug mode.
+* New methods `.RequestHandler.get_query_argument` and
+  `.RequestHandler.get_body_argument` and new attributes
+  `.HTTPRequest.query_arguments` and `.HTTPRequest.body_arguments` allow access
+  to arguments without intermingling those from the query string with those
+  from the request body.
+* `.websocket_connect` now returns an error immediately for refused connections
+  instead of waiting for the timeout.
+* Exceptions will no longer be logged twice when using both ``@asynchronous``
+  and ``@gen.coroutine``
+* Swallow a spurious exception from ``set_nodelay`` when a connection
+  has been reset.
+* Coroutines may now yield dicts in addition to lists to wait for
+  multiple tasks in parallel.
+* Fix an error from `tornado.log.enable_pretty_logging` when
+  `sys.stderr` does not have an ``isatty`` method.
+* `.WebSocketClientConnection` now has a ``close`` method.
+* It is now possible to specify handlers by name when using the `.URLSpec`
+  class.
+* On Python 2.6, ``simple_httpclient`` now uses TLSv1 instead of SSLv3.
+* Added `.GoogleOAuth2Mixin` support authentication to Google services
+  with OAuth 2 instead of OpenID and OAuth 1.
+* TODO: document asyncio and C extension module.
index d9a43c7c2991f5a173521fe072e39aaa72ccbc5a..b62f2b57e8d0193c13d8764b7f3f600b174b93a0 100644 (file)
 
          General settings:
 
-         * ``debug``: If ``True`` the application runs in debug mode,
-           described in :ref:`debug-mode`.
+         * ``autoreload``: If ``True``, the server process will restart
+           when any source files change, as described in :ref:`debug-mode`.
+           This option is new in Tornado 3.2; previously this functionality
+           was controlled by the ``debug`` setting.
+         * ``debug``: Shorthand for several debug mode settings,
+           described in :ref:`debug-mode`.  Setting ``debug=True`` is
+           equivalent to ``autoreload=True``, ``compiled_template_cache=False``,
+           ``static_hash_cache=False``, ``serve_traceback=True``.
+         * ``default_handler_class`` and ``default_handler_args``:
+           This handler will be used if no other match is found;
+           use this to implement custom 404 pages (new in Tornado 3.2).
          * ``gzip``: If ``True``, responses in textual formats will be
            gzipped automatically.
          * ``log_function``: This function will be called at the end
            `RequestHandler` object).  The default implementation
            writes to the `logging` module's root logger.  May also be
            customized by overriding `Application.log_request`.
+         * ``serve_traceback``: If true, the default error page
+           will include the traceback of the error.  This option is new in
+           Tornado 3.2; previously this functionality was controlled by
+           the ``debug`` setting.
          * ``ui_modules`` and ``ui_methods``: May be set to a mapping
            of `UIModule` or UI methods to be made available to templates.
            May be set to a module, dictionary, or a list of modules
            of a function that all output should be passed through.
            Defaults to ``"xhtml_escape"``.  Can be changed on a per-template
            basis with the ``{% autoescape %}`` directive.
+         * ``compiled_template_cache``: Default is ``True``; if ``False``
+           templates will be recompiled on every request.  This option
+           is new in Tornado 3.2; previously this functionality was controlled
+           by the ``debug`` setting.
          * ``template_path``: Directory containing template files.  Can be
            further customized by overriding `RequestHandler.get_template_path`
          * ``template_loader``: Assign to an instance of
 
          Static file settings:
 
+         * ``static_hash_cache``: Default is ``True``; if ``False``
+           static urls will be recomputed on every request.  This option
+           is new in Tornado 3.2; previously this functionality was controlled
+           by the ``debug`` setting.
          * ``static_path``: Directory from which static files will be
            served.
          * ``static_url_prefix``:  Url prefix for static files,
index e906af9070b3714587d699f99247f7290ff9340d..219254966f4f0c1e796d4cf59e1889a19ba5ea7c 100644 (file)
@@ -32,6 +32,7 @@
    .. automethod:: WebSocketHandler.async_callback
    .. automethod:: WebSocketHandler.ping
    .. automethod:: WebSocketHandler.on_pong
+   .. autoexception:: WebSocketClosedError
 
 
    Client-side support
index 448576a787f0e7d819938475afef3b1193b7bfdf..217ebdf598d621507c38feaa7f2b6916fd108cac 100644 (file)
@@ -52,6 +52,9 @@ be returned when they are all finished::
         response3 = response_dict['response3']
         response4 = response_dict['response4']
 
+.. versionchanged:: 3.2
+   Dict support added.
+
 For more complicated interfaces, `Task` can be split into two parts:
 `Callback` and `Wait`::
 
index f6e470807d3d0772558865c1eaa417269723573c..34e7b76858d3cc5b4fa70cf987d414316da1ef79 100644 (file)
@@ -407,6 +407,20 @@ class HTTPRequest(object):
        `.RequestHandler.get_argument`, which returns argument values as
        unicode strings.
 
+    .. attribute:: query_arguments
+
+       Same format as ``arguments``, but contains only arguments extracted
+       from the query string.
+
+       .. versionadded:: 3.2
+
+    .. attribute:: body_arguments
+
+       Same format as ``arguments``, but contains only arguments extracted
+       from the request body.
+
+       .. versionadded:: 3.2
+
     .. attribute:: files
 
        File uploads are available in the files property, which maps file
index 32cfcfcfe8b65dfcfe03dc2a7c518999b6a63f7e..a19e75f038af6f60f13e458045c0b46e967c7ead 100644 (file)
@@ -370,6 +370,8 @@ class RequestHandler(object):
         last value.
 
         The returned value is always unicode.
+
+        .. versionadded:: 3.2
         """
         return self._get_argument(name, default, self.request.body_arguments, strip)
 
@@ -379,6 +381,8 @@ class RequestHandler(object):
         If the argument is not present, returns an empty list.
 
         The returned values are always unicode.
+
+        .. versionadded:: 3.2
         """
         return self._get_arguments(name, self.request.body_arguments, strip)
 
@@ -393,6 +397,8 @@ class RequestHandler(object):
         last value.
 
         The returned value is always unicode.
+
+        .. versionadded:: 3.2
         """
         return self._get_argument(name, default, self.request.query_arguments, strip)
 
@@ -402,6 +408,8 @@ class RequestHandler(object):
         If the argument is not present, returns an empty list.
 
         The returned values are always unicode.
+
+        .. versionadded:: 3.2
         """
         return self._get_arguments(name, self.request.query_arguments, strip)
 
@@ -2542,12 +2550,12 @@ class URLSpec(object):
         assert len(self.regex.groupindex) in (0, self.regex.groups), \
             ("groups in url regexes must either be all named or all "
              "positional: %r" % self.regex.pattern)
-        
+
         if isinstance(handler, str):
             # import the Module and instantiate the class
             # Must be a fully qualified name (module.ClassName)
             handler = import_object(handler)
-        
+
         self.handler_class = handler
         self.kwargs = kwargs or {}
         self.name = name
index ac6af5f3bcbab7d2c1a6de33b146ab97018e447d..e394242408df8c3298db3c6ed5dc702e36eb01e3 100644 (file)
@@ -52,6 +52,10 @@ class WebSocketError(Exception):
 
 
 class WebSocketClosedError(WebSocketError):
+    """Raised by operations on a closed connection.
+
+    .. versionadded:: 3.2
+    """
     pass
 
 
@@ -163,6 +167,12 @@ class WebSocketHandler(tornado.web.RequestHandler):
         encoded as json).  If the ``binary`` argument is false, the
         message will be sent as utf8; in binary mode any byte string
         is allowed.
+
+        If the connection is already closed, raises `WebSocketClosedError`.
+
+        .. versionchanged:: 3.2
+           `WebSocketClosedError` was added (previously a closed connection
+           would raise an `AttributeError`)
         """
         if self.ws_connection is None:
             raise WebSocketClosedError()
@@ -781,7 +791,10 @@ class WebSocketClientConnection(simple_httpclient._HTTPConnection):
             104857600, self.resolver)
 
     def close(self):
-        """Closes the websocket connection."""
+        """Closes the websocket connection.
+
+        .. versionadded:: 3.2
+        """
         if self.protocol is not None:
             self.protocol.close()
             self.protocol = None
@@ -853,6 +866,9 @@ def websocket_connect(url, io_loop=None, callback=None, connect_timeout=None):
 
     Takes a url and returns a Future whose result is a
     `WebSocketClientConnection`.
+
+    .. versionchanged:: 3.2
+       Also accepts ``HTTPRequest`` objects in place of urls.
     """
     if io_loop is None:
         io_loop = IOLoop.current()