Feature or enhancement
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) |