From e2896587710e31d3bea51a35b486286045de7c0c Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Sun, 12 May 2013 18:08:23 -0400 Subject: [PATCH] Release note and doc updates --- docs/iostream.rst | 1 + docs/releases/next.rst | 39 ++++++++++++++++++++++++++++++++++++++- docs/testing.rst | 2 ++ docs/web.rst | 1 + docs/websocket.rst | 1 + tornado/websocket.py | 2 +- 6 files changed, 44 insertions(+), 2 deletions(-) diff --git a/docs/iostream.rst b/docs/iostream.rst index 85b4d28aa..a2933a8f2 100644 --- a/docs/iostream.rst +++ b/docs/iostream.rst @@ -21,6 +21,7 @@ .. automethod:: BaseIOStream.closed .. automethod:: BaseIOStream.reading .. automethod:: BaseIOStream.writing + .. automethod:: BaseIOStream.set_nodelay Methods for subclasses ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/docs/releases/next.rst b/docs/releases/next.rst index 60f44e13b..6942283af 100644 --- a/docs/releases/next.rst +++ b/docs/releases/next.rst @@ -40,7 +40,8 @@ In progress * Fixed an exception in `.WSGIContainer` when the connection is closed while output is being written. * Silenced some log messages when connections are opened and immediately - closed (i.e. port scans). + closed (i.e. port scans), or other situations related to closed + connections. * The default `.Resolver` implementation now works on Solaris. * Memory is now reclaimed promptly on CPython when an HTTP request fails because it exceeded the maximum upload size. @@ -48,3 +49,39 @@ In progress * `.Locale.format_date` now works on Python 3. * Some internal names used by the template system have been changed; now all "reserved" names in templates start with ``_tt_``. +* The constructors of `.TCPServer` and `.HTTPServer` now take a + ``max_buffer_size`` keyword argument. +* Fixed a bug in `.BaseIOStream.read_until_close` that would sometimes + cause data to be passed to the final callback instead of the streaming + callback. +* The `.IOStream` close callback is now run more reliably if there is + an exception in ``_try_inline_read``. +* New method `.RequestHandler.log_exception` can be overridden to + customize the logging behavior when an exception is uncaught. Most + apps that currently override ``_handle_request_exception`` can now + use a combination of `.RequestHandler.log_exception` and + `.write_error`. +* The ``TCP_NODELAY`` flag is now set when appropriate in `.HTTPServer` + and ``simple_httpclient``. +* New methods `.BaseIOStream.set_nodelay` and + `.WebSocketHandler.set_nodelay` can be used to set the + ``TCP_NODELAY`` flag. +* The cache used in `.HTTPHeaders` will no longer grow without bound. +* Various small speedups: `.HTTPHeaders` case normalization, `.UIModule` + proxy objects, precompile some regexes. +* `.bind_unused_port` now passes ``None`` instead of ``0`` as the port + to ``getaddrinfo``, which works better with some unusual network + configurations. +* `.RequestHandler.get_argument` now raises `.MissingArgumentError` + (a subclass of `tornado.web.HTTPError`, which is what it raised previously) + if the argument cannot be found. +* New function `.run_with_stack_context` facilitates the use of stack + contexts with coroutines. +* `.url_escape` and `.url_unescape` have a new ``plus`` argument (defaulting + to True for consistency with the previous behavior) which specifies + whether they work like `urllib.parse.unquote` or `urllib.parse.unquote_plus`. +* `.Application.reverse_url` now uses `.url_escape` with ``plus=False``, + i.e. spaces are encoded as ``%20`` instead of ``+``. +* Arguments extracted from the url path are now decoded with + `.url_unescape` with ``plus=False``, so plus signs are left as-is + instead of being turned into spaces. diff --git a/docs/testing.rst b/docs/testing.rst index b5fa75381..334d25879 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -37,3 +37,5 @@ .. autofunction:: bind_unused_port .. autofunction:: get_unused_port + + .. autofunction:: get_async_test_timeout diff --git a/docs/web.rst b/docs/web.rst index 585047f68..a400dcad3 100644 --- a/docs/web.rst +++ b/docs/web.rst @@ -95,6 +95,7 @@ .. automethod:: RequestHandler.get_status .. automethod:: RequestHandler.get_template_path .. automethod:: RequestHandler.get_user_locale + .. automethod:: RequestHandler.log_exception .. automethod:: RequestHandler.on_connection_close .. automethod:: RequestHandler.require_setting .. automethod:: RequestHandler.reverse_url diff --git a/docs/websocket.rst b/docs/websocket.rst index 793a665fb..e906af907 100644 --- a/docs/websocket.rst +++ b/docs/websocket.rst @@ -24,6 +24,7 @@ .. automethod:: WebSocketHandler.allow_draft76 .. automethod:: WebSocketHandler.get_websocket_scheme + .. automethod:: WebSocketHandler.set_nodelay Other ----- diff --git a/tornado/websocket.py b/tornado/websocket.py index dd4e4b475..4a62882d4 100644 --- a/tornado/websocket.py +++ b/tornado/websocket.py @@ -237,7 +237,7 @@ class WebSocketHandler(tornado.web.RequestHandler): bandwidth usage), call ``self.set_nodelay(True)`` once the websocket connection is established. - See `.IOStream.set_nodelay` for additional details. + See `.BaseIOStream.set_nodelay` for additional details. """ self.stream.set_nodelay(value) -- 2.47.2