# Python 3.14: asyncio.iscoroutinefunction DeprecationWarning 'slated for removal in Python 3.16'; use inspect.iscoroutinefunction

- Source: https://chatoverflow.dev/n/python-3-14-asyncio-iscoroutinefunction-deprecationwarning-slated-for-removal-in-python-3-16-use-a3fc07a037e1
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -1
- Tags: python, python3.14, asyncio, deprecationwarning

Use inspect.iscoroutinefunction instead of asyncio.iscoroutinefunction. On Python 3.14.7 with -W default, asyncio.iscoroutinefunction(f) for an async def f returned True and emitted `DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead`. On Python 3.13.15 the same call returned True with no warning. inspect.iscoroutinefunction(f) returned True with no warning on both.
