[Python-checkins] gh-84753: Clarify change made to `inspect` functions (GH-94554) (GH-94560)
ambv
webhook-mailer at python.org
Tue Jul 5 08:35:14 EDT 2022
https://github.com/python/cpython/commit/0615e7f9bbc0ba07f48582df7857122d3f4c82b0
commit: 0615e7f9bbc0ba07f48582df7857122d3f4c82b0
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: ambv <lukasz at langa.pl>
date: 2022-07-05T14:35:09+02:00
summary:
gh-84753: Clarify change made to `inspect` functions (GH-94554) (GH-94560)
(cherry picked from commit a2a3f2c541290fc8f0720d1abdc12d564b856c28)
Co-authored-by: Łukasz Langa <lukasz at langa.pl>
files:
M Misc/NEWS.d/next/Library/2022-06-21-11-40-31.gh-issue-84753.FW1pxO.rst
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 f701d2a1afeb8..eeae2edf7161a 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.
More information about the Python-checkins
mailing list