]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Release notes for 6.2 3151/head
authorBen Darnell <ben@bendarnell.com>
Thu, 9 Jun 2022 02:14:39 +0000 (22:14 -0400)
committerBen Darnell <ben@bendarnell.com>
Thu, 9 Jun 2022 02:15:57 +0000 (22:15 -0400)
docs/releases.rst
docs/releases/v6.2.0.rst [new file with mode: 0644]
tornado/ioloop.py
tornado/netutil.py
tornado/testing.py

index a478821d780e2aeb3507df3661f0cbf24a5ae172..9e7b6cc03a4931fc2b9e8031f39190d7ce08dd97 100644 (file)
@@ -4,6 +4,7 @@ Release notes
 .. toctree::
    :maxdepth: 2
 
+   releases/v6.2.0
    releases/v6.1.0
    releases/v6.0.4
    releases/v6.0.3
diff --git a/docs/releases/v6.2.0.rst b/docs/releases/v6.2.0.rst
new file mode 100644 (file)
index 0000000..f2c794f
--- /dev/null
@@ -0,0 +1,109 @@
+What's new in Tornado 6.2.0
+===========================
+
+Jun XX, 2022
+------------
+
+Deprecation notice
+~~~~~~~~~~~~~~~~~~
+
+- TODO py310 deprecations
+- ``TwistedResolver`` and ``CaresResolver`` are deprecated and will be
+  removed in Tornado 7.0.
+- `.AnyThreadEventLoopPolicy` is deprecated. This class controls the creation of
+  the "current" event loop so it will be removed when that concept is no longer
+  supported.
+- `.IOLoop.make_current` and `.IOLoop.clear_current` are deprecated. In the
+  future the concept of a "current" event loop as distinct from one that is
+  currently running will be removed.
+- The `.IOLoop` constructor is deprecated. Use `.IOLoop.current` when the loop
+  is already running instead. 
+- `.AsyncTestCase` (and `.AsyncHTTPTestCase`) are deprecated. Use
+  `unittest.IsolatedAsyncioTestCase` instead.
+- Multi-process `.TCPServer.bind`/`.TCPServer.start` is deprecated. See
+  `.TCPServer` docs for supported alternatives.
+
+General changes
+~~~~~~~~~~~~~~~
+
+- The minimum supported Python version is now 3.7.
+- SSL certificate verfication and hostname checks are now enabled by default in
+  more places (primarily in client-side usage of `.SSLIOStream`).
+- Various improvements to type hints throughout the package.
+- CI has moved from Travis and Appveyor to Github Actions.  
+
+`tornado.gen`
+~~~~~~~~~~~~~
+
+- Fixed a bug in which ``WaitIterator.current_index`` could be incorrect.
+- ``tornado.gen.TimeoutError``` is now an alias for `asyncio.TimeoutError`.
+
+`tornado.http1connection`
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+- ``max_body_size`` may now be set to zero to disallow a non-empty body.
+- ``Content-Encoding: gzip`` is now recognized case-insensitively.
+
+`tornado.httpclient`
+~~~~~~~~~~~~~~~~~~~~
+
+- ``curl_httpclient`` now supports non-ASCII (ISO-8859-1) header values, same as
+  ``simple_httpclient``.
+
+`tornado.ioloop`
+~~~~~~~~~~~~~~~~
+
+- `.PeriodicCallback` now understands coroutines and will not start multiple
+  copies if a previous invocation runs too long.
+- `.PeriodicCallback` now accepts `datetime.timedelta` objects in addition to
+  numbers of milliseconds.
+- Avoid logging "Event loop is closed" during shutdown-related race conditions.
+- Tornado no longer calls `logging.basicConfig` when starting an IOLoop; this
+  has been unnecessary since Python 3.2 added a logger of last resort.
+
+`tornado.iostream`
+~~~~~~~~~~~~~~~~~~
+
+- `.SSLIOStream` now supports reading more than 2GB at a time.
+- ``IOStream.write`` now supports typed `memoryview` objects.
+
+`tornado.locale`
+~~~~~~~~~~~~~~~~
+
+- `.load_gettext_translations` no longer logs errors when language directories
+  exist but do not contain the expected file.
+
+`tornado.netutil`
+~~~~~~~~~~~~~~~~~
+
+- `.is_valid_ip` no longer raises exceptions when the input is too long.
+- The default resolver now uses the same methods (and thread pool) as `asyncio`.
+
+`tornado.tcpserver`
+~~~~~~~~~~~~~~~~~~~
+
+- `.TCPServer.listen` now supports more arguments to pass through to
+  `.netutil.bind_sockets`.
+
+`tornado.testing`
+~~~~~~~~~~~~~~~~~
+
+- `.bind_unused_port` now takes an optional ``address`` argument.
+- Wrapped test methods now include the ``__wrapped__`` attribute.
+  
+`tornado.web`
+~~~~~~~~~~~~~
+
+- When using a custom `.StaticFileHandler` subclass, the ``reset()`` method is
+  now called on this subclass instead of the base class.
+- Improved handling of the ``Accept-Language`` header.
+- `.Application.listen` now supports more arguments to pass through to
+  `.netutil.bind_sockets`.
+
+`tornado.websocket`
+~~~~~~~~~~~~~~~~~~~
+
+- `.WebSocketClientConnection.write_message` now accepts `dict` arguments for
+  consistency with `.WebSocketHandler.write_message`.
+- `.WebSocketClientConnection.write_message` now raises an exception as
+  documented if the connection is already closed.
\ No newline at end of file
index 1a689a4c29efad17b9963f29deabe3ae135ac81c..9bb977ba19b94f9c1b635228ae17b1f250c6486a 100644 (file)
@@ -862,6 +862,9 @@ class PeriodicCallback(object):
        longer than ``callback_time``, subsequent invocations will be skipped.
        Previously this was only true for regular functions, not coroutines,
        which were "fire-and-forget" for `PeriodicCallback`.
+
+       The ``callback_time`` argument now accepts `datetime.timedelta` objects,
+       in addition to the previous numeric milliseconds.
     """
 
     def __init__(
index 3567b74d7ee51ed4a734ae510ec42eb859c45cc9..069e9a6ba7a5fbe82b3b507821ac40988cc9b420 100644 (file)
@@ -324,12 +324,12 @@ class Resolver(Configurable):
     The implementations of this interface included with Tornado are
 
     * `tornado.netutil.DefaultLoopResolver`
-    * `tornado.netutil.DefaultExecutorResolver`
+    * `tornado.netutil.DefaultExecutorResolver` (deprecated)
     * `tornado.netutil.BlockingResolver` (deprecated)
     * `tornado.netutil.ThreadedResolver` (deprecated)
     * `tornado.netutil.OverrideResolver`
-    * `tornado.platform.twisted.TwistedResolver`
-    * `tornado.platform.caresresolver.CaresResolver`
+    * `tornado.platform.twisted.TwistedResolver` (deprecated)
+    * `tornado.platform.caresresolver.CaresResolver` (deprecated)
 
     .. versionchanged:: 5.0
        The default implementation has changed from `BlockingResolver` to
@@ -402,6 +402,10 @@ class DefaultExecutorResolver(Resolver):
     """Resolver implementation using `.IOLoop.run_in_executor`.
 
     .. versionadded:: 5.0
+
+    .. deprecated:: 6.2
+
+       Use `DefaultLoopResolver` instead.
     """
 
     async def resolve(
index 1ed6e8585547d71c24f7b3765d3bd24306a3be64..688464f01b9aec340989ce8daad00432ce87cb4b 100644 (file)
@@ -435,6 +435,10 @@ class AsyncHTTPTestCase(AsyncTestCase):
     like ``http_client.fetch()``, into a synchronous operation. If you need
     to do other asynchronous operations in tests, you'll probably need to use
     ``stop()`` and ``wait()`` yourself.
+
+    .. deprecated:: 6.2
+       `AsyncTestCase` and `AsyncHTTPTestCase` are deprecated due to changes
+       in Python 3.10; see comments on `AsyncTestCase` for more details.
     """
 
     def setUp(self) -> None: