Feature or enhancement
Refs #122858
Refs #122875
It is scheduled to be removed in 3.16:
|
# A marker for iscoroutinefunction. |
|
_is_coroutine = object() |
|
|
|
|
|
def iscoroutinefunction(func): |
|
import warnings |
|
"""Return True if func is a decorated coroutine function.""" |
|
warnings._deprecated("asyncio.iscoroutinefunction", |
|
f"{warnings._DEPRECATED_MSG}; " |
|
"use inspect.iscoroutinefunction() instead", |
|
remove=(3,16)) |
|
return _iscoroutinefunction(func) |
|
|
|
|
|
def _iscoroutinefunction(func): |
|
return (inspect.iscoroutinefunction(func) or |
|
getattr(func, '_is_coroutine', None) is _is_coroutine) |
Linked PRs
Feature or enhancement
Refs #122858
Refs #122875
It is scheduled to be removed in 3.16:
cpython/Lib/asyncio/coroutines.py
Lines 16 to 32 in 46a2c11
Linked PRs
asyncio.iscoroutinefunctionfunction #149601