summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorƁukasz Langa <lukasz@langa.pl>2022-07-05 12:14:19 (GMT)
committerGitHub <noreply@github.com>2022-07-05 12:14:19 (GMT)
commita2a3f2c541290fc8f0720d1abdc12d564b856c28 (patch)
treeec4fca26910ab598228f3c01ce483c4ff7297536
parent92bcb26d000c5890127a87ade2bd813cf1218704 (diff)
downloadcpython-a2a3f2c541290fc8f0720d1abdc12d564b856c28.zip
cpython-a2a3f2c541290fc8f0720d1abdc12d564b856c28.tar.gz
cpython-a2a3f2c541290fc8f0720d1abdc12d564b856c28.tar.bz2
gh-84753: Clarify change made to `inspect` functions (#94554)
-rw-r--r--Misc/NEWS.d/next/Library/2022-06-21-11-40-31.gh-issue-84753.FW1pxO.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/Misc/NEWS.d/next/Library/2022-06-21-11-40-31.gh-issue-84753.FW1pxO.rst b/Misc/NEWS.d/next/Library/2022-06-21-11-40-31.gh-issue-84753.FW1pxO.rst
index f701d2a..eeae2ed 100644
--- a/Misc/NEWS.d/next/Library/2022-06-21-11-40-31.gh-issue-84753.FW1pxO.rst
+++ b/Misc/NEWS.d/next/Library/2022-06-21-11-40-31.gh-issue-84753.FW1pxO.rst
@@ -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.