Skip to content

Adopt proven Trio/anyio patterns into asyncio — implementation tracking #145370

@kovan

Description

@kovan

This issue tracks the implementation PRs for adopting proven Trio/anyio patterns natively into asyncio, as proposed in the discuss.python.org thread: Adopt proven anyio/Trio patterns natively into asyncio (multi-release roadmap).

PRs

Tier 1 — Structured concurrency foundations

Tier 2 — Resource management & communication

Design principles

All implementations follow the same approach:

  • Adopt proven patterns — APIs closely mirror battle-tested Trio/anyio designs
  • Pure Python where possible (only CancelScope touches C code for Task internals)
  • Zero overhead for existing code — no behavioral changes unless new APIs are explicitly used
  • Reuse existing asyncio infrato_thread(), create_future(), create_task(), etc.
  • Comprehensive test coverage — 169 new tests total across all PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions