Skip to content

Swap deprecated "asyncio.iscoroutinefunction" with "inspect.iscoroutinefunction" #4054

@mdmintz

Description

@mdmintz

I started seeing this DeprecationWarning on Python 3.14:

/Users/michael/github/SeleniumBase/seleniumbase/undetected/cdp_driver/connection.py:669: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead iscoroutinefunction(callback)

Looks like that deprecation is happening in Python 3.16, but I'm not going to wait that long to change things.
I'll just make the fix now to avoid seeing those deprecation warnings.
I'll swap asyncio.iscoroutinefunction with inspect.iscoroutinefunction.
Same for swapping asyncio.iscoroutine with inspect.iscoroutine.

Metadata

Metadata

Assignees

Labels

UC Mode / CDP ModeUndetected Chromedriver Mode / CDP ModeenhancementMaking things better

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions