pep-0492: Add "async/await in CPython code base" section.
This commit is contained in:
parent
718e47edfc
commit
7cf393e6a7
23
pep-0492.txt
23
pep-0492.txt
|
@ -815,7 +815,7 @@ This proposal preserves 100% backwards compatibility.
|
|||
|
||||
|
||||
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 @@ The required changes are mainly:
|
|||
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 @@ decorated with ``@asyncio.coroutine`` *before* starting to use the new
|
|||
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
|
||||
---------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue