]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
docs: Update whatsnew/3.6 with asyncio changes
authorYury Selivanov <yselivanov@sprymix.com>
Mon, 16 May 2016 20:25:16 +0000 (16:25 -0400)
committerYury Selivanov <yselivanov@sprymix.com>
Mon, 16 May 2016 20:25:16 +0000 (16:25 -0400)
Doc/whatsnew/3.6.rst

index ce0ce82ce74e177053aaefc604444215b6835acb..52be1342aa3a8dc8e4deb26aee52255623b644a3 100644 (file)
@@ -190,6 +190,59 @@ New Modules
 Improved Modules
 ================
 
+
+asyncio
+-------
+
+Since the :mod:`asyncio` module is :term:`provisional <provisional api>`,
+all changes introduced in Python 3.6 have also been backported to Python
+3.5.x.
+
+Notable changes in the :mod:`asyncio` module since Python 3.5.0:
+
+* The :func:`~asyncio.ensure_future` function and all functions that
+  use it, such as :meth:`loop.run_until_complete() <asyncio.BaseEventLoop.run_until_complete>`,
+  now accept all kinds of :term:`awaitable objects <awaitable>`.
+  (Contributed by Yury Selivanov.)
+
+* New :func:`~asyncio.run_coroutine_threadsafe` function to submit
+  coroutines to event loops from other threads.
+  (Contributed by Vincent Michel.)
+
+* New :meth:`Transport.is_closing() <asyncio.BaseTransport.is_closing>`
+  method to check if the transport is closing or closed.
+  (Contributed by Yury Selivanov.)
+
+* The :meth:`loop.create_server() <asyncio.BaseEventLoop.create_server>`
+  method can now accept a list of hosts.
+  (Contributed by Yann Sionneau.)
+
+* New :meth:`loop.create_future() <asyncio.BaseEventLoop.create_future>`
+  method to create Future objects.  This allows alternative event
+  loop implementations, such as
+  `uvloop <https://github.com/MagicStack/uvloop>`_, to provide a faster
+  :class:`asyncio.Future` implementation.
+  (Contributed by Yury Selivanov.)
+
+* New :meth:`loop.get_exception_handler() <asyncio.BaseEventLoop.get_exception_handler>`
+  method to get the current exception handler.
+  (Contributed by Yury Selivanov.)
+
+* New :func:`~asyncio.timeout` context manager to simplify timeouts
+  handling code.
+  (Contributed by Andrew Svetlov.)
+
+* New :meth:`StreamReader.readuntil() <asyncio.StreamReader.readuntil>`
+  method to read data from the stream until a separator bytes
+  sequence appears.
+  (Contributed by Mark Korenberg.)
+
+* The :meth:`loop.getaddrinfo() <asyncio.BaseEventLoop.getaddrinfo>`
+  method is optimized to avoid calling the system ``getaddrinfo``
+  function if the address is already resolved.
+  (Contributed by A. Jesse Jiryu Davis.)
+
+
 contextlib
 ----------