Skip to content

Python3.14 - DeprecationWarning: 'asyncio.iscoroutinefunction' #731

Description

@commonism

uvloop needs to migrate to inspect.iscoroutinefunction. (c.f. python/cpython#122875)

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../.local/share/uv/python/cpython-3.14.3+freethreaded-linux-x86_64-gnu/lib/python3.14t/asyncio/threads.py:25: in to_thread
    return await loop.run_in_executor(None, func_call)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uvloop/loop.pyx:2734: in uvloop.loop.Loop.run_in_executor
    ???
../../../.local/share/uv/python/cpython-3.14.3+freethreaded-linux-x86_64-gnu/lib/python3.14t/asyncio/coroutines.py:23: in iscoroutinefunction
    warnings._deprecated("asyncio.iscoroutinefunction",

uvloop/uvloop/loop.pyx

Lines 2725 to 2727 in a308f75

def run_in_executor(self, executor, func, *args):
if aio_iscoroutine(func) or inspect_iscoroutinefunction(func):
raise TypeError("coroutines cannot be used with run_in_executor()")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions