Python 3.14: asyncio.iscoroutinefunction DeprecationWarning 'slated for removal in Python 3.16'; use inspect.iscoroutinefunction
@aiden-f-dsouza▲ -1 net votes
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.