From: Ben Darnell Date: Sun, 11 Jan 2015 23:58:53 +0000 (-0500) Subject: Catch up on next-release notes. X-Git-Tag: v4.1.0b1~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd6c849a2f644d36b596a7b93d1a8d17e5efc6fa;p=thirdparty%2Ftornado.git Catch up on next-release notes. --- diff --git a/docs/releases/next.rst b/docs/releases/next.rst index ab83e7518..ced7373a6 100644 --- a/docs/releases/next.rst +++ b/docs/releases/next.rst @@ -27,3 +27,42 @@ In progress side, and use the ``compression_options`` keyword argument to `.websocket_connect` on the client side. * `.RequestHandler.locale` now has a property setter. +* `.Future` now catches and logs exceptions in its callbacks. +* `.gen.engine` now correctly captures the stack context for its callbacks. +* `.AsyncTestCase` has better support for multiple exceptions. Previously + it would silently swallow all but the last; now it raises the first + and logs all the rest. +* ``curl_httpclient`` now runs the streaming and header callbacks on + the IOLoop. +* `.StaticFileHandler` no longer logs a stack trace if the connection is + closed while sending the file. +* `.WebSocketHandler` no longer logs stack traces when the connection + is closed. +* `tornado.options.define` more accurately finds the module defining the + option. +* `.WebSocketHandler.open` now accepts ``*args, **kw`` for consistency + with ``RequestHandler.get`` and related methods. +* `.AsyncTestCase` now cleans up `.Subprocess` state on ``tearDown`` when + necessary. +* The ``kqueue`` and ``select`` IOLoop implementations now reports + writeability correctly, fixing flow control in IOStream. +* `tornado.httpclient.HTTPRequest` accepts a new argument + ``raise_error=False`` to suppress the default behavior of raising an + error for non-200 response codes. +* `.Application.add_handlers` hostname matching now works correctly with + IPv6 literals. +* Redirects for the `.Application` ``default_host`` setting now match + the request protocol instead of redirecting HTTPS to HTTP. +* New function `tornado.httputil.split_host_and_port` for parsing + the ``netloc`` portion of URLs. +* The `.asynchronous` decorator now understands `concurrent.futures.Future` + in addition to `tornado.concurrent.Future`. +* `.HTTPServerRequest.body` is now always a byte string (previously the default + empty body would be a unicode string on python 3). +* `.TCPServer` no longer ignores its ``read_chunk_size`` argument. +* The ``Sec-WebSocket-Version`` header now includes all supported versions. +* Header parsing now works correctly when newline-like unicode characters + are present. +* Header parsing again supports both CRLF and bare LF line separators. +* `.HTTPServer` now always reports ``HTTP/1.1`` instead of echoing + the request version. diff --git a/tornado/httputil.py b/tornado/httputil.py index 0f798ca95..cd8dcd545 100644 --- a/tornado/httputil.py +++ b/tornado/httputil.py @@ -885,6 +885,8 @@ def split_host_and_port(netloc): """Returns ``(host, port)`` tuple from ``netloc``. Returned ``port`` will be ``None`` if not present. + + .. versionadded:: 4.1 """ match = re.match(r'^(.+):(\d+)$', netloc) if match: