]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-84753: Clarify change made to `inspect` functions (#94554)
authorŁukasz Langa <lukasz@langa.pl>
Tue, 5 Jul 2022 12:14:19 +0000 (14:14 +0200)
committerGitHub <noreply@github.com>
Tue, 5 Jul 2022 12:14:19 +0000 (13:14 +0100)
Misc/NEWS.d/next/Library/2022-06-21-11-40-31.gh-issue-84753.FW1pxO.rst

index f701d2a1afeb856be41c1120788cf2a35797fd8d..eeae2edf7161aa7c488355af791ed7f120f68117 100644 (file)
@@ -1,3 +1,7 @@
-:func:`inspect.iscoroutinefunction` now properly returns ``True`` when an instance
-of :class:`unittest.mock.AsyncMock` is passed to it.  This makes it consistent with
+:func:`inspect.iscoroutinefunction`, :func:`inspect.isgeneratorfunction`,
+and :func:`inspect.isasyncgenfunction` now properly return ``True`` for
+duck-typed function-like objects like instances of
+:class:`unittest.mock.AsyncMock`.
+
+This makes :func:`inspect.iscoroutinefunction` consistent with the
 behavior of :func:`asyncio.iscoroutinefunction`.  Patch by Mehdi ABAAKOUK.