Commit b4a0d52a authored by Yury Selivanov's avatar Yury Selivanov

docs: Update whatsnew/3.6 with asyncio changes

parent f979d558
......@@ -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
----------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment