Skip to content

Python 3.14 - DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated #195

@alorence

Description

@alorence

What happened?

Hello !

With python 3.14, when warnings are enabled (default for pytest, 'python' launched with -Walways, -Wall, -Wonce, etc. cli option), the following warning is printed to stderr

<project>/.venv/lib/python3.14/site-packages/asyncstdlib/functools.py:257: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead
    if iscoroutinefunction(type_or_getter):

This could be easy to fix by checking current python version and import iscoroutinefunction from inspect by default, or fallback to asyncio.iscoroutinefunction for python 3.13 and lower

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions