summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorCarlton Gibson <carlton@noumenal.es>2022-12-18 19:13:24 (GMT)
committerGitHub <noreply@github.com>2022-12-18 19:13:24 (GMT)
commit532aa4e4e019812d0388920768ede7c04232ebe1 (patch)
treebac6a6c3f467bc6a7d7ac1210fc5f9929cc2742a /Misc
parent1cf3d78c92eb07dc09d15cc2e773b0b1b9436825 (diff)
downloadcpython-532aa4e4e019812d0388920768ede7c04232ebe1.zip
cpython-532aa4e4e019812d0388920768ede7c04232ebe1.tar.gz
cpython-532aa4e4e019812d0388920768ede7c04232ebe1.tar.bz2
gh-94912: Added marker for non-standard coroutine function detection (#99247)
This introduces a new decorator `@inspect.markcoroutinefunction`, which, applied to a sync function, makes it appear async to `inspect.iscoroutinefunction()`.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2022-11-17-10-02-18.gh-issue-94912.G2aa-E.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2022-11-17-10-02-18.gh-issue-94912.G2aa-E.rst b/Misc/NEWS.d/next/Library/2022-11-17-10-02-18.gh-issue-94912.G2aa-E.rst
new file mode 100644
index 0000000..ee00f9d
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2022-11-17-10-02-18.gh-issue-94912.G2aa-E.rst
@@ -0,0 +1,2 @@
+Add :func:`inspect.markcoroutinefunction` decorator which manually marks
+a function as a coroutine for the benefit of :func:`iscoroutinefunction`.