Skip to content

Commit 18695d7

Browse files
committed
pythongh-84753: Clarify change made to inspect functions
The wording used in pythonGH-94050 suggests narrower scope than what was actually implemented. This commit clarifies the full impact of pythonGH-94050 in the change log.
1 parent 4791a8a commit 18695d7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
:func:`inspect.iscoroutinefunction` now properly returns ``True`` when an instance
2-
of :class:`unittest.mock.AsyncMock` is passed to it. This makes it consistent with
1+
:func:`inspect.iscoroutinefunction`, :func:`inspect.isgeneratorfunction`,
2+
and :func:`inspect.isasyncgenfunction` now properly return ``True`` for
3+
duck-typed function-like objects like instances of
4+
:class:`unittest.mock.AsyncMock`.
5+
6+
This makes :func:`inspect.iscoroutinefunction` consistent with the
37
behavior of :func:`asyncio.iscoroutinefunction`. Patch by Mehdi ABAAKOUK.

0 commit comments

Comments
 (0)