]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-149694: Fix missing docstring on `asyncio.iscoroutinefunction` (GH-149696...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 23 May 2026 08:24:14 +0000 (10:24 +0200)
committerGitHub <noreply@github.com>
Sat, 23 May 2026 08:24:14 +0000 (13:54 +0530)
[3.15] gh-149694: Fix missing docstring on `asyncio.iscoroutinefunction` (GH-149696)
(cherry picked from commit 6a6600569985e4006900bae16812f2d19c8ab97b)

Co-authored-by: deadlovelll <128279579+deadlovelll@users.noreply.github.com>
Lib/asyncio/coroutines.py

index a51319cb72a6a9b22104c283378b17c291126092..6727065bbe323ffd5c99d3303b8b832ec6b58afe 100644 (file)
@@ -18,8 +18,8 @@ _is_coroutine = object()
 
 
 def iscoroutinefunction(func):
-    import warnings
     """Return True if func is a decorated coroutine function."""
+    import warnings
     warnings._deprecated("asyncio.iscoroutinefunction",
                          f"{warnings._DEPRECATED_MSG}; "
                          "use inspect.iscoroutinefunction() instead",