https://github.com/python/cpython/commit/00cf5eacc52d4790c23a24c835fb6b048cb27d8c
commit: 00cf5eacc52d4790c23a24c835fb6b048cb27d8c
branch: main
author: Case Zumbrum <51789445+casezumb...@users.noreply.github.com>
committer: kumaraditya303 <kumaradi...@python.org>
date: 2025-04-13T07:59:22Z
summary:

gh-129169: update `asyncio.ensure_future` docs to suggest taskgroups 


Co-authored-by: Kumar Aditya <kumaradi...@python.org>

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

diff --git a/Doc/library/asyncio-future.rst b/Doc/library/asyncio-future.rst
index 9dce0731411940..32771ba72e0002 100644
--- a/Doc/library/asyncio-future.rst
+++ b/Doc/library/asyncio-future.rst
@@ -51,12 +51,13 @@ Future Functions
 
    .. important::
 
-      See also the :func:`create_task` function which is the
-      preferred way for creating new Tasks.
-
       Save a reference to the result of this function, to avoid
       a task disappearing mid-execution.
 
+      See also the :func:`create_task` function which is the
+      preferred way for creating new tasks or use :class:`asyncio.TaskGroup`
+      which keeps reference to the task internally.
+
    .. versionchanged:: 3.5.1
       The function accepts any :term:`awaitable` object.
 

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to