Tags: alexmv/tornado
Tags
What's new in Tornado 6.1.0 Oct 30, 2020 ------------ Deprecation notice ~~~~~~~~~~~~~~~~~~ - This is the last release of Tornado to support Python 3.5. Future versions will require Python 3.6 or newer. General changes ~~~~~~~~~~~~~~~ - Windows support has been improved. Tornado is now compatible with the proactor event loop (which became the default in Python 3.8) by automatically falling back to running a selector in a second thread. This means that it is no longer necessary to explicitly configure a selector event loop, although doing so may improve performance. This does not change the fact that Tornado is significantly less scalable on Windows than on other platforms. - Binary wheels are now provided for Windows, MacOS, and Linux (amd64 and arm64). `tornado.gen` ~~~~~~~~~~~~~ - `.coroutine` now has better support for the Python 3.7+ ``contextvars`` module. In particular, the ``ContextVar.reset`` method is now supported. `tornado.http1connection` ~~~~~~~~~~~~~~~~~~~~~~~~~ - ``HEAD`` requests to handlers that used chunked encoding no longer produce malformed output. - Certain kinds of malformed ``gzip`` data no longer cause an infinite loop. `tornado.httpclient` ~~~~~~~~~~~~~~~~~~~~ - Setting ``decompress_response=False`` now works correctly with ``curl_httpclient``. - Mixing requests with and without proxies works correctly in ``curl_httpclient`` (assuming the version of pycurl is recent enough). - A default ``User-Agent`` of ``Tornado/$VERSION`` is now used if the ``user_agent`` parameter is not specified. - After a 303 redirect, ``tornado.simple_httpclient`` always uses ``GET``. Previously this would use ``GET`` if the original request was a ``POST`` and would otherwise reuse the original request method. For ``curl_httpclient``, the behavior depends on the version of ``libcurl`` (with the most recent versions using ``GET`` after 303 regardless of the original method). - Setting ``request_timeout`` and/or ``connect_timeout`` to zero is now supported to disable the timeout. `tornado.httputil` ~~~~~~~~~~~~~~~~~~ - Header parsing is now faster. - `.parse_body_arguments` now accepts incompletely-escaped non-ASCII inputs. `tornado.iostream` ~~~~~~~~~~~~~~~~~~ - `ssl.CertificateError` during the SSL handshake is now handled correctly. - Reads that are resolved while the stream is closing are now handled correctly. `tornado.log` ~~~~~~~~~~~~~ - When colored logging is enabled, ``logging.CRITICAL`` messages are now recognized and colored magenta. `tornado.netutil` ~~~~~~~~~~~~~~~~~ - ``EADDRNOTAVAIL`` is now ignored when binding to ``localhost`` with IPv6. This error is common in docker. `tornado.platform.asyncio` ~~~~~~~~~~~~~~~~~~~~~~~~~~ - `.AnyThreadEventLoopPolicy` now also configures a selector event loop for these threads (the proactor event loop only works on the main thread) ``tornado.platform.auto`` ~~~~~~~~~~~~~~~~~~~~~~~~~ - The ``set_close_exec`` function has been removed. `tornado.testing` ~~~~~~~~~~~~~~~~~ - `.ExpectLog` now has a ``level`` argument to ensure that the given log level is enabled. `tornado.web` ~~~~~~~~~~~~~ - ``RedirectHandler.get`` now accepts keyword arguments. - When sending 304 responses, more headers (including ``Allow``) are now preserved. - ``reverse_url`` correctly handles escaped characters in the regex route. - Default ``Etag`` headers are now generated with SHA-512 instead of MD5. `tornado.websocket` ~~~~~~~~~~~~~~~~~~~ - The ``ping_interval`` timer is now stopped when the connection is closed. - `.websocket_connect` now raises an error when it encounters a redirect instead of hanging.
Merge pull request tornadoweb#2940 from bdarnell/bump6.1b2 Bump version to 6.1b2
What's new in Tornado 6.1.0 Oct X, 2020 ----------- General changes ~~~~~~~~~~~~~~~ - Windows support has been improved. Tornado is now compatible with the proactor event loop (which became the default in Python 3.8) by automatically falling back to running a selector in a second thread. This means that it is no longer necessary to explicitly configure a selector event loop, although doing so may improve performance. This does not change the fact that Tornado is significantly less scalable on Windows than on other platforms. - Binary wheels are now provided for Windows, MacOS, and Linux (amd64 and arm64). `tornado.http1connection` ~~~~~~~~~~~~~~~~~~~~~~~~~ - ``HEAD`` requests to handlers that used chunked encoding no longer produce malformed output. - Certain kinds of malformed ``gzip`` data no longer cause an infinite loop. `tornado.httpclient` ~~~~~~~~~~~~~~~~~~~~ - Setting ``decompress_response=False`` now works correctly with ``curl_httpclient``. - Mixing requests with and without proxies works correctly in ``curl_httpclient`` (assuming the version of pycurl is recent enough). - A default ``User-Agent`` of ``Tornado/$VERSION`` is now used if the ``user_agent`` parameter is not specified. - After a 303 redirect, ``tornado.simple_httpclient`` always uses ``GET``. Previously this would use ``GET`` if the original request was a ``POST`` and would otherwise reuse the original request method. For ``curl_httpclient``, the behavior depends on the version of ``libcurl`` (with the most recent versions using ``GET`` after 303 regardless of the original method). - Setting ``request_timeout`` and/or ``connect_timeout`` to zero is now supported to disable the timeout. `tornado.httputil` ~~~~~~~~~~~~~~~~~~ - Header parsing is now faster. - `.parse_body_arguments` now accepts incompletely-escaped non-ASCII inputs. `tornado.iostream` ~~~~~~~~~~~~~~~~~~ - `ssl.CertificateError` during the SSL handshake is now handled correctly. - Reads that are resolved while the stream is closing are now handled correctly. `tornado.log` ~~~~~~~~~~~~~ - When colored logging is enabled, ``logging.CRITICAL`` messages are now recognized and colored magenta. `tornado.netutil` ~~~~~~~~~~~~~~~~~ - ``EADDRNOTAVAIL`` is now ignored when binding to ``localhost`` with IPv6. This error is common in docker. `tornado.platform.asyncio` ~~~~~~~~~~~~~~~~~~~~~~~~~~ - `.AnyThreadEventLoopPolicy` now also configures a selector event loop for these threads (the proactor event loop only works on the main thread) ``tornado.platform.auto`` ~~~~~~~~~~~~~~~~~~~~~~~~~ - The ``set_close_exec`` function has been removed. `tornado.testing` ~~~~~~~~~~~~~~~~~ - `.ExpectLog` now has a ``level`` argument to ensure that the given log level is enabled. `tornado.web` ~~~~~~~~~~~~~ - ``RedirectHandler.get`` now accepts keyword arguments. - When sending 304 responses, more headers (including ``Allow``) are now preserved. - ``reverse_url`` correctly handles escaped characters in the regex route. - Default ``Etag`` headers are now generated with SHA-512 instead of MD5. `tornado.websocket` ~~~~~~~~~~~~~~~~~~~ - The ``ping_interval`` timer is now stopped when the connection is closed. - `.websocket_connect` now raises an error when it encounters a redirect instead of hanging.
What's new in Tornado 6.0.4 Mar 3, 2020 ----------- General changes ~~~~~~~~~~~~~~~ - Binary wheels are now available for Python 3.8 on Windows. Note that it is still necessary to use ``asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())`` for this platform/version. Bug fixes ~~~~~~~~~ - Fixed an issue in `.IOStream` (introduced in 6.0.0) that resulted in ``StreamClosedError`` being incorrectly raised if a stream is closed mid-read but there is enough buffered data to satisfy the read. - `.AnyThreadEventLoopPolicy` now always uses the selector event loop on Windows.
What's new in Tornado 6.0.3 Jun 22, 2019 ------------ Bug fixes ~~~~~~~~~ - `.gen.with_timeout` always treats ``asyncio.CancelledError`` as a ``quiet_exception`` (this improves compatibility with Python 3.8, which changed ``CancelledError`` to a ``BaseException``). - ``IOStream`` now checks for closed streams earlier, avoiding spurious logged errors in some situations (mainly with websockets).
What's new in Tornado 6.0.2 Mar 23, 2019 ------------ Bug fixes ~~~~~~~~~ - `.WebSocketHandler.set_nodelay` works again. - Accessing ``HTTPResponse.body`` now returns an empty byte string instead of raising ``ValueError`` for error responses that don't have a body (it returned None in this case in Tornado 5).
What's new in Tornado 6.0 Mar 1, 2019 ----------- Backwards-incompatible changes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Python 2.7 and 3.4 are no longer supported; the minimum supported Python version is 3.5.2. - APIs deprecated in Tornado 5.1 have been removed. This includes the ``tornado.stack_context`` module and most ``callback`` arguments throughout the package. All removed APIs emitted `DeprecationWarning` when used in Tornado 5.1, so running your application with the ``-Wd`` Python command-line flag or the environment variable ``PYTHONWARNINGS=d`` should tell you whether your application is ready to move to Tornado 6.0. - ``.WebSocketHandler.get`` is now a coroutine and must be called accordingly in any subclasses that override this method (but note that overriding ``get`` is not recommended; either ``prepare`` or ``open`` should be used instead). General changes ~~~~~~~~~~~~~~~ - Tornado now includes type annotations compatible with ``mypy``. These annotations will be used when type-checking your application with ``mypy``, and may be usable in editors and other tools. - Tornado now uses native coroutines internally, improving performance. `tornado.auth` ~~~~~~~~~~~~~~ - All ``callback`` arguments in this package have been removed. Use the coroutine interfaces instead. - The ``OAuthMixin._oauth_get_user`` method has been removed. Override `~.OAuthMixin._oauth_get_user_future` instead. `tornado.concurrent` ~~~~~~~~~~~~~~~~~~~~ - The ``callback`` argument to `.run_on_executor` has been removed. - ``return_future`` has been removed. `tornado.gen` ~~~~~~~~~~~~~ - Some older portions of this module have been removed. This includes ``engine``, ``YieldPoint``, ``Callback``, ``Wait``, ``WaitAll``, ``MultiYieldPoint``, and ``Task``. - Functions decorated with ``@gen.coroutine`` no longer accept ``callback`` arguments. `tornado.httpclient` ~~~~~~~~~~~~~~~~~~~~ - The behavior of ``raise_error=False`` has changed. Now only suppresses the errors raised due to completed responses with non-200 status codes (previously it suppressed all errors). - The ``callback`` argument to `.AsyncHTTPClient.fetch` has been removed. `tornado.httputil` ~~~~~~~~~~~~~~~~~~ - ``HTTPServerRequest.write`` has been removed. Use the methods of ``request.connection`` instead. - Unrecognized ``Content-Encoding`` values now log warnings only for content types that we would otherwise attempt to parse. `tornado.ioloop` ~~~~~~~~~~~~~~~~ - ``IOLoop.set_blocking_signal_threshold``, ``IOLoop.set_blocking_log_threshold``, ``IOLoop.log_stack``, and ``IOLoop.handle_callback_exception`` have been removed. - Improved performance of `.IOLoop.add_callback`. `tornado.iostream` ~~~~~~~~~~~~~~~~~~ - All ``callback`` arguments in this module have been removed except for `.BaseIOStream.set_close_callback`. - ``streaming_callback`` arguments to `.BaseIOStream.read_bytes` and `.BaseIOStream.read_until_close` have been removed. - Eliminated unnecessary logging of "Errno 0". `tornado.log` ~~~~~~~~~~~~~ - Log files opened by this module are now explicitly set to UTF-8 encoding. `tornado.netutil` ~~~~~~~~~~~~~~~~~ - The results of ``getaddrinfo`` are now sorted by address family to avoid partial failures and deadlocks. `tornado.platform.twisted` ~~~~~~~~~~~~~~~~~~~~~~~~~~ - ``TornadoReactor`` and ``TwistedIOLoop`` have been removed. ``tornado.simple_httpclient`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - The default HTTP client now supports the ``network_interface`` request argument to specify the source IP for the connection. - If a server returns a 3xx response code without a ``Location`` header, the response is raised or returned directly instead of trying and failing to follow the redirect. - When following redirects, methods other than ``POST`` will no longer be transformed into ``GET`` requests. 301 (permanent) redirects are now treated the same way as 302 (temporary) and 303 (see other) redirects in this respect. - Following redirects now works with ``body_producer``. ``tornado.stack_context`` ~~~~~~~~~~~~~~~~~~~~~~~~~ - The ``tornado.stack_context`` module has been removed. `tornado.tcpserver` ~~~~~~~~~~~~~~~~~~~ - `.TCPServer.start` now supports a ``max_restarts`` argument (same as `.fork_processes`). `tornado.testing` ~~~~~~~~~~~~~~~~~ - `.AsyncHTTPTestCase` now drops all references to the `.Application` during ``tearDown``, allowing its memory to be reclaimed sooner. - `.AsyncTestCase` now cancels all pending coroutines in ``tearDown``, in an effort to reduce warnings from the python runtime about coroutines that were not awaited. Note that this may cause ``asyncio.CancelledError`` to be logged in other places. Coroutines that expect to be running at test shutdown may need to catch this exception. `tornado.web` ~~~~~~~~~~~~~ - The ``asynchronous`` decorator has been removed. - The ``callback`` argument to `.RequestHandler.flush` has been removed. - `.StaticFileHandler` now supports large negative values for the ``Range`` header and returns an appropriate error for ``end > start``. - It is now possible to set ``expires_days`` in ``xsrf_cookie_kwargs``. `tornado.websocket` ~~~~~~~~~~~~~~~~~~~ - Pings and other messages sent while the connection is closing are now silently dropped instead of logging exceptions. - Errors raised by ``open()`` are now caught correctly when this method is a coroutine. `tornado.wsgi` ~~~~~~~~~~~~~~ - ``WSGIApplication`` and ``WSGIAdapter`` have been removed.
Merge pull request tornadoweb#2588 from bdarnell/6.0b1 Set version to 6.0b1
What's new in Tornado 5.1.1 Sep 16, 2018 ------------ Bug fixes ~~~~~~~~~ - Fixed an case in which the `.Future` returned by `.RequestHandler.finish` could fail to resolve. - The `.TwitterMixin.authenticate_redirect` method works again. - Improved error handling in the `tornado.auth` module, fixing hanging requests when a network or other error occurs.
PreviousNext