GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add a section about async generators in `asyncio` docs · Issue #100108 · python/cpython

Add a section about async generators in asyncio docs #100108

New issue
Copy link
New issue
Copy link
Closed
Closed
Add a section about async generators in asyncio docs#100108
Copy link
Assignees
sergey-miryanov
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirtopic-asyncio

Description

@kumaraditya303
kumaraditya303
opened on Dec 8, 2022
Issue body actions

Currently async generators have little documentation, we should add a best practices section for this in the docs to avoid common pitfalls.
Some of the things to be documented off top of my head:

  • Recommend to manually close the generator instead of relying on the gc. (Most important)
  • Avoid iterating and closing the same generator concurrently.
  • Only create a generator when a loop is already running.

If anyone from the docs group is interested, that would be much appreciated.

Linked PRs

  • GH-100108: Add async generators best practices section #141885
  • [3.14] GH-100108: Add async generators best practices section (GH-141885) #146252
  • [3.13] GH-100108: Add async generators best practices section (GH-141885) #146253
Reacted by Alex Waygood

Activity

  1. kumaraditya303
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    topic-asyncio
    on Dec 8, 2022
  2. ezio-melotti
    added this to asyncioon Dec 8, 2022
  3. ezio-melotti
    moved this to Todo in asyncioon Dec 8, 2022
  4. sergey-miryanov
    self-assigned this
    on Nov 12, 2025
  5. kumaraditya303
    added a commit that references this issue on Mar 21, 2026

    GH-100108: Add async generators best practices section (#141885)

    897fa23
  6. miss-islington
    added 2 commits that reference this issue on Mar 21, 2026

    pythonGH-100108: Add async generators best practices section (pythonG…

    65a11e0

    pythonGH-100108: Add async generators best practices section (pythonG…

    3de80f0
  7. kumaraditya303
    closed this as completedon Mar 21, 2026
  8. github-project-automation
    moved this from Todo to Done in asyncioon Mar 21, 2026
  9. kumaraditya303
    added 2 commits that reference this issue on Mar 21, 2026

    [3.14] GH-100108: Add async generators best practices section (GH-141885

    d6e0066

    [3.13] GH-100108: Add async generators best practices section (GH-141885

    84c1fa3
  10. CuriousLearner
    added a commit that references this issue on Mar 22, 2026

    Merge remote-tracking branch 'upstream/main' into fix-pythongh-138577

    2691ad9
  11. ljfp
    added a commit that references this issue on Apr 25, 2026

    pythonGH-100108: Add async generators best practices section (python#…

    789e8b0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @sergey-miryanov
    sergey-miryanov

Labels

docsDocumentation in the Doc dirDocumentation in the Doc dirtopic-asyncio

Projects

  • asyncio
    Status
    Done
    Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.