Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.2k
Replace deprecated asyncio.iscoroutinefunction() call with inspect.iscoroutinefunction()#3545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:dev
Are you sure you want to change the base?
Conversation
…coroutinefunction()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull request overview
This PR addresses a deprecation warning by replacingasyncio.iscoroutinefunction() withinspect.iscoroutinefunction() across the codebase. Theasyncio version is deprecated as of Python 3.14 and will be removed in Python 3.16.
Key changes:
- Replace all instances of
asyncio.iscoroutinefunction()withinspect.iscoroutinefunction() - Add
inspectmodule imports where needed - Remove unused
asyncioimport fromdash/_callback.py
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| dash/dash.py | Addedinspect import; replaced two instances ofasyncio.iscoroutinefunction() withinspect.iscoroutinefunction() |
| dash/background_callback/managers/diskcache_manager.py | Addedinspect import; replacedasyncio.iscoroutinefunction() withinspect.iscoroutinefunction() |
| dash/background_callback/managers/celery_manager.py | Addedinspect import; replacedasyncio.iscoroutinefunction() withinspect.iscoroutinefunction() |
| dash/_jupyter.py | Replacedasyncio.iscoroutinefunction() withinspect.iscoroutinefunction() (import likely exists elsewhere in file) |
| dash/_callback.py | Addedinspect import; replaced two instances ofasyncio.iscoroutinefunction() withinspect.iscoroutinefunction(); removed unusedasyncio import |
💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.
| break | ||
| ifasyncio.iscoroutinefunction(kernel.do_one_iteration): | ||
| ifinspect.iscoroutinefunction(kernel.do_one_iteration): |
CopilotAIDec 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Theinspect module is not imported in this file. Addimport inspect at the top of the file to avoid a NameError at runtime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It's imported on line 3 😄
T4rk1n left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
💃
The
asyncio.iscoutinefunction()function is deprecated and will be removed in python 3.16. This begins raising deprecation warnings in python 3.14. This PR cleans that all up.Contributor Checklist
optionals
CHANGELOG.md