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 — [3.14] gh-137026: Add an explainer guide for asyncio (GH-137215) by miss-islington · Pull Request #137581 · python/cpython

Conversation

@miss-islington

@miss-islington miss-islington commented Aug 9, 2025 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
    • Add an explainer guide (aka HOWTO, not how-to) for asyncio.
  • Fix linter errors.

    • Enforce max line length of roughly 79 chars.
  • Start sentences on new lines to minimize disruption of diffs.
  • Add reference to subinterpreters.

    • Significantly reduce article size. Remove both example sections & "Which concurrency do I want" section.
  • Align section-header lengths with section names.

    • Remove reference to deleted section.
    • Fix a variety of rote style guide items like title-alignment, use of ie and $, and so forth.
  • Add links to other parts of the docs for keywords and objects like await, coro, task, future, etc.
    • One last title alignment.
    • Style nit.
    • Rework a variety of I statements.
  • Lint fix.

    • Firm up commentary on yield from in corotuines.
  • Update language comparing await and yield from.

    • Remove await-ing Tasks and futures section
  • Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma [email protected]

  • Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma [email protected]

    • Address comments related to style & writing flow.
  • per-thread event loop note.

  • Add section describing coroutines roots in generators.

  • Phrasing tweak.

  • Use asyncio.create_task instead of asyncio.Task

  • Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma [email protected]

  • Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma [email protected]

  • small phrasing.

  • Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma [email protected]

  • phrasing nit.

  • style nits

  • Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma [email protected]

  • phrasing nit

  • Fix misnaming of async generator.

  • phrasing nits.

  • Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma [email protected]

  • Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma [email protected]

  • consistent spacing

  • Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma [email protected]

  • phrasing nits

  • Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma [email protected]

  • Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma [email protected]

  • Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma [email protected]

  • Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma [email protected]

  • add conclusion

  • nits

    • Variety of style & grammar improvements thanks to ZeroIntensity's comments.
    • Make all directives start with a 3 space indent. Then 4 thereafter.
    • Use :linenos: instead of manually writing the line numbers.
    • Fix label typo for article.
  • fix label link.

  • Apply suggestions from code review

Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) [email protected]
Co-authored-by: Carol Willing [email protected]
Co-authored-by: Peter Bierma [email protected]

    • introduce async-sleep name
  • Phrasing

  • nit

  • ungendered octopus

  • teammates

  • jobs

  • rework fella to penguin

    • remove byline; add seealso
  • Change ref from asyncio to use seealso block.

  • Remove typehints. Fix indentation in one code example.

  • Slight rephrase for clarity.

  • Make references point to asyncio. Wrap some long lines.

    • Variety of style/phrasing improvements based on PR feedback.
  • phrasing.

  • phrasing nit.

  • Apply suggestions from code review

Co-authored-by: Peter Bierma [email protected]

  • Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Carol Willing [email protected]

  • nit

  • Apply suggestions from code review

Co-authored-by: Carol Willing [email protected]

  • fix backticks.

  • nits

  • nit

  • add section on asyncio.run

  • title change under the hood.

  • modify task coro example.

  • howtos article link.

  • prefer await without backticks.

  • phrasing tweak.

  • Rework phrasing around how await tasks pauses and returns control in the await section.

  • move code block to beforfe explanation in coroutine under the hood.

  • phrasing.

  • link to yield from.

  • style nits

  • nit

    • Modify language re: event-loop cycling endlessly.
  • Discuss why await was designed to not yield for coros.
    • Add a note about debug=True on asyncio.run to await coro section.
  • clarity nit

    • Add two other references in seealso block.
  • nit

  • Language simplification

  • Apply suggestions from code review

Co-authored-by: Peter Bierma [email protected]

  • nit

  • grammar fix.

  • fix

  • worker bees

  • rework event loop paragraph to significantly deemphasize queues

  • remove all references to queue besides the initial analogy.

  • add note about garbage collection of tasks

  • add practical note re: garbage collection

  • phrasing nits

  • re arrange note on task gc.

  • line wrap nit

  • Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Kumar Aditya [email protected]

  • link to debug mode docs.

  • readd part2 prefix.

  • simplify title.

  • fix titles. tihnk I messed this up earlier.

  • avoid idiom in title.

  • fix titles once agian.

  • Apply suggestions from code review

Co-authored-by: Stan Ulbrych [email protected]

  • rework task gc example.

  • phrasing tweak.

  • tewak.

  • nit

  • nit

  • nit

  • nit


(cherry picked from commit 3964f97)

Co-authored-by: Alexander Nordin [email protected]
Co-authored-by: Peter Bierma [email protected]
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) [email protected]
Co-authored-by: Carol Willing [email protected]
Co-authored-by: Kumar Aditya [email protected]
Co-authored-by: Stan Ulbrych [email protected]

  • Issue: Documentation enhancement proposal: explainer for asyncio #137026

📚 Documentation preview 📚: https://cpython-previews--137581.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@anordin95 @ZeroIntensity
@webknjaz @willingc @kumaraditya303 @StanFromIreland @miss-islington
pythongh-137026: Add an explainer guide for asyncio (pythonGH-137215)
a296903
* - Add an explainer guide (aka HOWTO, not how-to) for asyncio.

* Fix linter errors.

* - Enforce max line length of roughly 79 chars.
- Start sentences on new lines to minimize disruption of diffs.

* Add reference to subinterpreters.

* - Significantly reduce article size. Remove both example sections & "Which concurrency do I want" section.

* Align section-header lengths with section names.

* - Remove reference to deleted section.

* - Fix a variety of rote style guide items like title-alignment, use of ie and $, and so forth.
- Add links to other parts of the docs for keywords and objects like await, coro, task, future, etc.

* - One last title alignment.

* - Style nit.

* - Rework a variety of I statements.

* Lint fix.

* - Firm up commentary on yield from in corotuines.

* Update language comparing await and yield from.

* - Remove await-ing Tasks and futures section

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <[email protected]>

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <[email protected]>

* - Address comments related to style & writing flow.

* per-thread event loop note.

* Add section describing coroutines roots in generators.

* Phrasing tweak.

* Use asyncio.create_task instead of asyncio.Task

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <[email protected]>

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <[email protected]>

* small phrasing.

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <[email protected]>

* phrasing nit.

* style nits

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <[email protected]>

* phrasing nit

* Fix misnaming of async generator.

* phrasing nits.

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <[email protected]>

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <[email protected]>

* consistent spacing

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <[email protected]>

* phrasing nits

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <[email protected]>

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <[email protected]>

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <[email protected]>

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Peter Bierma <[email protected]>

* add conclusion

* nits

* - Variety of style & grammar improvements thanks to ZeroIntensity's comments.

* - Make all directives start with a 3 space indent. Then 4 thereafter.

* - Use :linenos: instead of manually writing the line numbers.

* - Fix label typo for article.

* fix label link.

* Apply suggestions from code review

Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
Co-authored-by: Carol Willing <[email protected]>
Co-authored-by: Peter Bierma <[email protected]>

* - introduce async-sleep name

* Phrasing

* nit

* ungendered octopus

* teammates

* jobs

* rework fella to penguin

* - remove byline; add seealso

* Change ref from asyncio to use seealso block.

* Remove typehints. Fix indentation in one code example.

* Slight rephrase for clarity.

* Make references point to asyncio. Wrap some long lines.

* - Variety of style/phrasing improvements based on PR feedback.

* phrasing.

* phrasing nit.

* Apply suggestions from code review

Co-authored-by: Peter Bierma <[email protected]>

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Carol Willing <[email protected]>

* nit

* Apply suggestions from code review

Co-authored-by: Carol Willing <[email protected]>

* fix backticks.

* nits

* nit

* add section on asyncio.run

* title change under the hood.

* modify task coro example.

* howtos article link.

* prefer await without backticks.

* phrasing tweak.

* Rework phrasing around how await tasks pauses and returns control in the await section.

* move code block to beforfe explanation in coroutine under the hood.

* phrasing.

* link to yield from.

* style nits

* nit

* - Modify language re: event-loop cycling endlessly.
- Discuss why await was designed to not yield for coros.

* - Add a note about debug=True on asyncio.run to await coro section.

* clarity nit

* - Add two other references in seealso block.

* nit

* Language simplification

* Apply suggestions from code review

Co-authored-by: Peter Bierma <[email protected]>

* nit

* grammar fix.

* fix

* worker bees

* rework event loop paragraph to significantly deemphasize queues

* remove all references to queue besides the initial analogy.

* add note about garbage collection of tasks

* add practical note re: garbage collection

* phrasing nits

* re arrange note on task gc.

* line wrap nit

* Update Doc/howto/a-conceptual-overview-of-asyncio.rst

Co-authored-by: Kumar Aditya <[email protected]>

* link to debug mode docs.

* readd part2 prefix.

* simplify title.

* fix titles. tihnk I messed this up earlier.

* avoid idiom in title.

* fix titles once agian.

* Apply suggestions from code review

Co-authored-by: Stan Ulbrych <[email protected]>

* rework task gc example.

* phrasing tweak.

* tewak.

* nit

* nit

* nit

* nit

---------
(cherry picked from commit 3964f97)

Co-authored-by: Alexander Nordin <[email protected]>
Co-authored-by: Peter Bierma <[email protected]>
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
Co-authored-by: Carol Willing <[email protected]>
Co-authored-by: Kumar Aditya <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
@miss-islington
miss-islington requested review from 1st1, asvetlov, kumaraditya303 and willingc as code owners August 9, 2025 05:29
@bedevere-app bedevere-app Bot added awaiting review docs Documentation in the Doc dir skip news labels Aug 9, 2025
@github-project-automation github-project-automation Bot added this to Docs PRs Aug 9, 2025
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Aug 9, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Aug 9, 2025
Documentation enhancement proposal: explainer for asyncio #137026
Closed
@bedevere-app bedevere-app Bot added the topic-asyncio label Aug 9, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Aug 9, 2025
gh-137026: Add an explainer guide for asyncio #137215
Merged
willingc
willingc approved these changes Aug 9, 2025
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Aug 9, 2025
ZeroIntensity
ZeroIntensity approved these changes Aug 11, 2025
View reviewed changes
@hugovk
hugovk merged commit 36a1e1a into python:3.14 Aug 15, 2025
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Aug 15, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Aug 15, 2025
kumaraditya303 added a commit to miss-islington/cpython that referenced this pull request Sep 9, 2025
@miss-islington @anordin95
@ZeroIntensity @webknjaz @willingc @kumaraditya303 @StanFromIreland
[3.14] pythongh-137026: Add an explainer guide for asyncio (pythonGH-…
4f2f95f
…137215) (python#137581)

Co-authored-by: Alexander Nordin <[email protected]>
Co-authored-by: Peter Bierma <[email protected]>
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
Co-authored-by: Carol Willing <[email protected]>
Co-authored-by: Kumar Aditya <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
@miss-islington
miss-islington deleted the backport-3964f97-3.14 branch January 2, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@willingc willingc willingc approved these changes
@ZeroIntensity ZeroIntensity ZeroIntensity approved these changes
@1st1 1st1 Awaiting requested review from 1st1 1st1 is a code owner
@asvetlov asvetlov Awaiting requested review from asvetlov asvetlov is a code owner
@kumaraditya303 kumaraditya303 Awaiting requested review from kumaraditya303 kumaraditya303 is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip news topic-asyncio

Projects

Docs PRs
Status: Done

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@miss-islington @willingc @ZeroIntensity @hugovk @anordin95
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.