-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Reflect deprecation for asyncio.iscoroutinefunction
#14074
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reflect deprecation for asyncio.iscoroutinefunction
#14074
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Diff from mypy_primer, showing the effect of this PR on open source code: aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/worker.py:73:44: error: overload def (func: def (*Any, **Any) -> typing.Coroutine[Any, Any, Any]) -> builtins.bool of function asyncio.coroutines.iscoroutinefunction is deprecated: Use inspect.iscoroutinefunction instead [deprecated]
+ aiohttp/worker.py:73:44: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-deprecated for more info [deprecated]
|
If I understand it correctly, it's sometimes necessary to use this on Python < 3.11, since it supports |
I'll close this in favor of @max-muoto 's #14289 . In which the tests are also already updated to keep testing both methods. |
I'll close this in favor of @max-muoto 's #14289 . In which the tests are also already updated to keep testing both methods. |
#12558 by @ZeroIntensity (since the branch was deleted) but without the Python 3.16 mention
I didn't scope the deprecation to only 3.14+ because I think any non-EOL Python version has a migration path. (I don't remember if we have exact guidelines on deprecated decorator)