[Python-checkins] gh-92223: Remove pre-Python 3.7 alternative in asyncio docs (GH-92224)

miss-islington webhook-mailer at python.org
Wed May 4 20:31:00 EDT 2022


https://github.com/python/cpython/commit/bb2dcf1c7996c9da3372b89c1759c94ed567b298
commit: bb2dcf1c7996c9da3372b89c1759c94ed567b298
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-05-04T17:30:54-07:00
summary:

gh-92223: Remove pre-Python 3.7 alternative in asyncio docs (GH-92224)

(cherry picked from commit d1b2e989be2bc5128d6602e4f370d0ee6f5ac476)

Co-authored-by: Sebastian Rittau <srittau at rittau.biz>

files:
M Doc/library/asyncio-task.rst

diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst
index efd4d1bc628ad..dc09286e5f852 100644
--- a/Doc/library/asyncio-task.rst
+++ b/Doc/library/asyncio-task.rst
@@ -20,7 +20,7 @@ Coroutines
 
 :term:`Coroutines <coroutine>` declared with the async/await syntax is the
 preferred way of writing asyncio applications.  For example, the following
-snippet of code (requires Python 3.7+) prints "hello", waits 1 second,
+snippet of code prints "hello", waits 1 second,
 and then prints "world"::
 
     >>> import asyncio
@@ -259,21 +259,6 @@ Creating Tasks
    :exc:`RuntimeError` is raised if there is no running loop in
    current thread.
 
-   This function has been **added in Python 3.7**.  Prior to
-   Python 3.7, the low-level :func:`asyncio.ensure_future` function
-   can be used instead::
-
-       async def coro():
-           ...
-
-       # In Python 3.7+
-       task = asyncio.create_task(coro())
-       ...
-
-       # This works in all Python versions but is less readable
-       task = asyncio.ensure_future(coro())
-       ...
-
    .. important::
 
       Save a reference to the result of this function, to avoid



More information about the Python-checkins mailing list