peps: pep-0492: Add "async/await in CPython code base" section.
https://hg.python.org/peps/rev/289f0f027cb2 changeset: 5814:289f0f027cb2 user: Yury Selivanov <yselivanov@sprymix.com> date: Thu Apr 30 21:21:44 2015 -0400 summary: pep-0492: Add "async/await in CPython code base" section. files: pep-0492.txt | 23 ++++++++++++++++++++--- 1 files changed, 20 insertions(+), 3 deletions(-) diff --git a/pep-0492.txt b/pep-0492.txt --- a/pep-0492.txt +++ b/pep-0492.txt @@ -815,7 +815,7 @@ asyncio -------- +''''''' ``asyncio`` module was adapted and tested to work with coroutines and new statements. Backwards compatibility is 100% preserved, i.e. all @@ -832,8 +832,8 @@ Deprecate ``async()`` function. -Migration strategy -'''''''''''''''''' +asyncio migration strategy +'''''''''''''''''''''''''' Because *plain generators* cannot ``yield from`` *native coroutine objects* (see `Differences from generators`_ section for more details), @@ -842,6 +842,23 @@ syntax. +async/await in CPython code base +'''''''''''''''''''''''''''''''' + +There is no use of ``await`` names in CPython. + +``async`` is mostly used by asyncio. We are addressing this by +renaming ``async()`` function to ``ensure_task()`` (see `asyncio`_ +section for details.) + +Another use of ``async`` keyword is in ``Lib/xml/dom/xmlbuilder.py``, +class ``DocumentLS``. ``async`` property is not documented, not +tested, and is not used anywhere. Methods that were likely supposed to +work with it -- ``_set_async()`` and ``_get_async()`` -- are not used +anywhere either. These methods will be deprecated in 3.5 and removed +in 3.6. + + Grammar Updates --------------- -- Repository URL: https://hg.python.org/peps
participants (1)
-
yury.selivanov