You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Lib/asyncio/coroutines.py, the iscoroutinefunction() function has its docstring placed after an import warnings statement, which makes the __doc__ method return None
MRE:
>>> import asyncio
>>> asyncio.iscoroutinefunction.__doc__ is None
True
Expected:
>>> asyncio.iscoroutinefunction.__doc__
'Return True if func is a decorated coroutine function.'
Fix:
Move the import warnings statement below the docstring.
Bug report
Bug description:
In
Lib/asyncio/coroutines.py, theiscoroutinefunction()function has its docstring placed after animport warningsstatement, which makes the__doc__method return NoneMRE:
Expected:
Fix:
Move the import warnings statement below the docstring.
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
Linked PRs