← 返回首页
Remove legacy code for generator based coroutines in `asyncio` · Issue #102748 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Remove legacy code for generator based coroutines in asyncio #102748

New issue
New issue

Description

Generator based coroutines were long deprecated and removed and asyncio doesn't not supports it. There is some left over code for supporting it which can be removed now.

The first thing is this behavior of asyncio.iscoroutine which makes no sense now. I propose to remove this first.

import asyncio def gen(): yield 1 assert not asyncio.iscoroutine(gen()) # fails

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    • Open in GitHub Copilot app

    Footer

    © 2026 GitHub, Inc.