Skip to content

[3.15] gh-149694: Fix missing docstring on asyncio.iscoroutinefunction#149696

Open
deadlovelll wants to merge 1 commit into
python:3.15from
deadlovelll:coro-f-doc
Open

[3.15] gh-149694: Fix missing docstring on asyncio.iscoroutinefunction#149696
deadlovelll wants to merge 1 commit into
python:3.15from
deadlovelll:coro-f-doc

Conversation

@deadlovelll
Copy link
Copy Markdown

gh-149694: Fix missing docstring on asyncio.iscoroutinefunction

The docstring in asyncio.iscoroutinefunction is currently dead code: it follows an import warnings statement, so Python does not treat it as docstring.

Before:

  >>> import asyncio
  >>> asyncio.iscoroutinefunction.__doc__ is None
  True

After:

  >>> asyncio.iscoroutinefunction.__doc__
  'Return True if func is a decorated coroutine function.'

The fix is a one-line reorder: move import warnings below the docstring.

@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 11, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@picnixz picnixz added skip news needs backport to 3.14 bugs and security fixes labels May 11, 2026
@picnixz picnixz changed the title gh-149694: Fix missing docstring on asyncio.iscoroutinefunction [3.15] gh-149694: Fix missing docstring on asyncio.iscoroutinefunction May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants