FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Reflect deprecation for `asyncio.iscoroutinefunction` by Avasam · Pull Request #14074 · python/typeshed · GitHub

Reflect deprecation for asyncio.iscoroutinefunction - #14074

Closed
Avasam wants to merge 7 commits into
python:mainfrom
Avasam:Reflect-deprecation-for-`asyncio.iscoroutinefunction`
Closed

Reflect deprecation for asyncio.iscoroutinefunction#14074
Avasam wants to merge 7 commits into
python:mainfrom
Avasam:Reflect-deprecation-for-`asyncio.iscoroutinefunction`

Conversation

Avasam commented May 15, 2025
edited
Loading

Copy link
Copy Markdown
Collaborator

#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)

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link
Copy Markdown
Contributor

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]

srittau commented Jul 26, 2025

Copy link
Copy Markdown
Collaborator

If I understand it correctly, it's sometimes necessary to use this on Python < 3.11, since it supports @coroutine (removed in 3.11), which the inspect version doesn't support.

Avasam mentioned this pull request Jul 27, 2025

Avasam commented Jul 27, 2025

Copy link
Copy Markdown
Collaborator Author

I'll close this in favor of @max-muoto 's #14289 . In which the tests are also already updated to keep testing both methods.

Avasam closed this Jul 27, 2025

Avasam commented Jul 27, 2025

Copy link
Copy Markdown
Collaborator Author

I'll close this in favor of @max-muoto 's #14289 . In which the tests are also already updated to keep testing both methods.

Avasam deleted the Reflect-deprecation-for-`asyncio.iscoroutinefunction` branch July 27, 2025 03:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL