-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
Deprecate asyncio.iscoroutinefunction
#122858
Comments
See #94923 , maybe you can review it :) |
Looks like an duplicate of #94912 |
No it isn't, in this issue we are just deprecating it not making an alias. |
Deprecate `asyncio.iscoroutinefunction` in favor of `inspect.iscoroutinefunction`. Co-authored-by: Kumar Aditya <[email protected]>
Deprecate `asyncio.iscoroutinefunction` in favor of `inspect.iscoroutinefunction`. Co-authored-by: Kumar Aditya <[email protected]>
If you get the deprecation error and want to support Python < 3.12, you may need to still use if sys.version_info >= (3, 12):
iscoroutinefunction = inspect.iscoroutinefunction
else:
iscoroutinefunction = asyncio.iscoroutinefunction |
asyncio.iscoroutinefunction
should be deprecated in favor ofinspect.iscoroutinefunction
, we don't need two different functions to do the same thing. I propose to deprecateasyncio.iscoroutinefunction
because IMO these introspection functions don't belong toasyncio
but more toinspect
module. It will be deprecated in Python 3.14 and scheduled for removal in Python 3.16.Linked PRs
asyncio.iscoroutinefunction
#122875The text was updated successfully, but these errors were encountered: