https://github.com/python/cpython/commit/539e85abc4931d2173e1311b6cf2c52ca94b0c45
commit: 539e85abc4931d2173e1311b6cf2c52ca94b0c45
branch: main
author: Timofei Ivankov <[email protected]>
committer: kumaraditya303 <[email protected]>
date: 2026-09-20T14:57:19+05:30
summary:
gh-157786: Document that asyncio does not support generator-based coroutines
(#157787)
files:
M Doc/library/asyncio-task.rst
diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst
index 1a13ad387f89b22..6df87d4d71a3657 100644
--- a/Doc/library/asyncio-task.rst
+++ b/Doc/library/asyncio-task.rst
@@ -175,6 +175,9 @@ other coroutines::
* a *coroutine object*: an object returned by calling a
*coroutine function*.
+ Generator-based coroutines, created with :func:`types.coroutine`, are
+ covered by neither term and are not supported by asyncio.
+
.. rubric:: Tasks
@@ -1220,6 +1223,10 @@ Introspection
.. versionadded:: 3.4
+ .. versionchanged:: 3.12
+ Generator-based coroutines are no longer supported, and ``False``
+ is returned for them.
+
.. _asyncio-task-obj:
Task object
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]