Skip to content

Commit 539e85a

Browse files
authored
gh-157786: Document that asyncio does not support generator-based coroutines (#157787)
1 parent 9ea05d4 commit 539e85a

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎Doc/library/asyncio-task.rst‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ other coroutines::
175175
* a *coroutine object*: an object returned by calling a
176176
*coroutine function*.
177177

178+
Generator-based coroutines, created with :func:`types.coroutine`, are
179+
covered by neither term and are not supported by asyncio.
180+
178181

179182
.. rubric:: Tasks
180183

@@ -1220,6 +1223,10 @@ Introspection
12201223

12211224
.. versionadded:: 3.4
12221225

1226+
.. versionchanged:: 3.12
1227+
Generator-based coroutines are no longer supported, and ``False``
1228+
is returned for them.
1229+
12231230
.. _asyncio-task-obj:
12241231

12251232
Task object

0 commit comments

Comments
 (0)