gh-122858: Deprecate `asyncio.iscoroutinefunction` by Wulian233 · Pull Request #122875 · python/cpython
blhsing pushed a commit to blhsing/cpython that referenced this pull request
Deprecate `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
Python 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
jenshnielsen added a commit to jenshnielsen/opentelemetry-python that referenced this pull request
asyncio.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