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

Add asyncio 3.14 deprecations by max-muoto · Pull Request #15176 · python/typeshed · GitHub

Add asyncio 3.14 deprecations - #15176

Merged
srittau merged 10 commits into
python:mainfrom
max-muoto:add-asyncio-deprecation
Dec 28, 2025
Merged

Add asyncio 3.14 deprecations#15176
srittau merged 10 commits into
python:mainfrom
max-muoto:add-asyncio-deprecation

Conversation

max-muoto commented Dec 25, 2025
edited
Loading

Copy link
Copy Markdown
Contributor

This PR adds the asyncio.iscoroutinefunction deprecations from #14289 with the only core change being that we only deprecate them for >= 3.11 due to @srittau's feedback here: #14074 (comment)

This comment has been minimized.

max-muoto marked this pull request as ready for review December 25, 2025 20:44

donbarbos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thank you, just suggestion about messages.
PR: python/cpython#122875

Comment thread stdlib/asyncio/coroutines.pyi Outdated
Comment thread stdlib/asyncio/coroutines.pyi Outdated
Comment thread stdlib/asyncio/coroutines.pyi Outdated
Comment thread stdlib/asyncio/coroutines.pyi Outdated

Copy link
Copy Markdown
Contributor Author

Thank you, just suggestion about messages. PR: python/cpython#122875

Good catch - would be best to follow the runtime messages here, will update.

max-muoto and others added 4 commits December 26, 2025 13:26
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>

This comment has been minimized.

This comment has been minimized.

srittau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Could you also move the tests for the inspect functions to a new file check_inspect.py?

Copy link
Copy Markdown
Contributor Author

Could you also move the tests for the inspect functions to a new file check_inspect.py?

Will do.

Copy link
Copy Markdown
Contributor Author

Could you also move the tests for the inspect functions to a new file check_inspect.py?

Done: 300644c

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/web_urldispatcher.py:159:44: error: overload def [_P, _T] (func: def (*_P.args, **_P.kwargs) -> typing.Awaitable[_T`-2]) -> TypeGuard[def (*_P.args, **_P.kwargs) -> typing.Coroutine[Any, Any, _T`-2]] of function asyncio.coroutines.iscoroutinefunction is deprecated: Deprecated since Python 3.14. Use `inspect.iscoroutinefunction()` instead.  [deprecated]
+ aiohttp/web_urldispatcher.py:159:44: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-deprecated for more info  [deprecated]
+ aiohttp/web_urldispatcher.py:167:44: error: overload def [_P, _T] (func: def (*_P.args, **_P.kwargs) -> typing.Awaitable[_T`-2]) -> TypeGuard[def (*_P.args, **_P.kwargs) -> typing.Coroutine[Any, Any, _T`-2]] of function asyncio.coroutines.iscoroutinefunction is deprecated: Deprecated since Python 3.14. Use `inspect.iscoroutinefunction()` instead.  [deprecated]
+ aiohttp/worker.py:68:44: error: overload def [_P] (func: def (*_P.args, **_P.kwargs) -> builtins.object) -> TypeGuard[def (*_P.args, **_P.kwargs) -> typing.Coroutine[Any, Any, Any]] of function asyncio.coroutines.iscoroutinefunction is deprecated: Deprecated since Python 3.14. Use `inspect.iscoroutinefunction()` instead.  [deprecated]

srittau merged commit 0338df4 into python:main Dec 28, 2025
63 checks passed
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.

3 participants


Back | FazBrowse Home | New Git URL