gh-122858: Deprecate `asyncio.iscoroutinefunction` by Wulian233 · Pull Request #122875 · python/cpython
blhsing pushed a commit to blhsing/cpython that referenced this pull request
Aug 22, 2024Deprecate `asyncio.iscoroutinefunction` in favor of `inspect.iscoroutinefunction`. Co-authored-by: Kumar Aditya <kumaraditya@python.org>
AdamWill pushed a commit to AdamWill/cached-property that referenced this pull request
Nov 5, 2024Python 3.14 will deprecate asyncio.iscoroutinefunction: python/cpython#122875 inspect.iscoroutinefunction exists since 3.5 and our baseline is 3.8, so we can just use it unconditionally. Using a wrapper with @asyncio.coroutine in __get__ wasn't necessary (the future from asyncio.ensure_future is awaitable, and the wrapper doesn't do anything asynchronous), so the logic can be simplified to just call asyncio.ensure_future (to schedule the task and store the result when it's available).
This was referenced
Mar 29, 2025jenshnielsen added a commit to jenshnielsen/opentelemetry-python that referenced this pull request
Oct 22, 2025asyncio.iscoroutinefunction is a wrapper around inspect.iscoroutinefunction and has been deprecated in 3.14 See python/cpython#122875 for reference
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