summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew/3.7.rst
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2018-05-23 17:35:04 (GMT)
committerGitHub <noreply@github.com>2018-05-23 17:35:04 (GMT)
commit28b9178023a445b1da2694774c265cd4b7a244ec (patch)
tree0a04c78407ebde36d31d03accfad5dea680aa5e9 /Doc/whatsnew/3.7.rst
parentb6dccf54fd3bac9c87348d96f9d6b571608c15bc (diff)
downloadcpython-28b9178023a445b1da2694774c265cd4b7a244ec.zip
cpython-28b9178023a445b1da2694774c265cd4b7a244ec.tar.gz
cpython-28b9178023a445b1da2694774c265cd4b7a244ec.tar.bz2
bpo-32436: Document PEP 567 changes to asyncio. (GH-7073)
Diffstat (limited to 'Doc/whatsnew/3.7.rst')
-rw-r--r--Doc/whatsnew/3.7.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst
index ac69719..af2aad9 100644
--- a/Doc/whatsnew/3.7.rst
+++ b/Doc/whatsnew/3.7.rst
@@ -608,6 +608,17 @@ include:
destroying the event loop.
(Contributed by Yury Selivanov in :issue:`32314`.)
+* asyncio gained support for :mod:`contextvars`.
+ :meth:`loop.call_soon() <asyncio.AbstractEventLoop.call_soon>`,
+ :meth:`loop.call_soon_threadsafe() <asyncio.AbstractEventLoop.call_soon_threadsafe>`,
+ :meth:`loop.call_later() <asyncio.AbstractEventLoop.call_later>`,
+ :meth:`loop.call_at() <asyncio.AbstractEventLoop.call_at>`, and
+ :meth:`Future.add_done_callback() <asyncio.Future.add_done_callback>`
+ have a new optional keyword-only *context* parameter.
+ :class:`Tasks <asyncio.Task>` now track their context automatically.
+ See :pep:`567` for more details.
+ (Contributed by Yury Selivanov in :issue:`32436`.)
+
* The new :func:`asyncio.create_task` function has been added as a shortcut
to ``asyncio.get_event_loop().create_task()``.
(Contributed by Andrew Svetlov in :issue:`32311`.)