Skip to content

The asyncio REPL does not manage the event loop properly #142784

Closed

Description

@johnslavik

Bug report

Bug description:

Most importantly, it doesn't call .close() on it, which blocks GH-140288 and causes surprising warnings on Windows (see GH-141262).

Ideally, we'd employ asyncio.Runner to manage the tricky and ever-changing parts of the lifecycle pipeline correctly.

CC @ZeroIntensity stdlib, topic-repl, topic-asyncio, 3.13, 3.14, 3.15

CPython versions tested on:

CPython main branch, 3.15, 3.14, 3.13

Operating systems tested on:

Linux, Windows, macOS

Linked PRs

Activity

  1. added
    type-bug
    on Dec 16, 2025
  2. added
    topic-repl
    on Dec 16, 2025
  3. added
    stdlib
    on Dec 16, 2025
  4. added
    3.13
    3.14
    3.15
    on Dec 16, 2025
  5. kumaraditya303 commented on Dec 17, 2025

    @kumaraditya303
    Contributor

    I think the simpler change is to just call loop.close, asyncio.Runner feels overkill for this.

  6. johnslavik commented on Dec 18, 2025

    @johnslavik
    MemberAuthor

    I think the simpler change is to just call loop.close, asyncio.Runner feels overkill for this.

    Sure. If we ever need a runner, we can add it later. 👍

  7. added a commit that references this issue on Dec 18, 2025
  8. added 2 commits that reference this issue on Dec 18, 2025
  9. added 2 commits that reference this issue on Dec 18, 2025
  10. moved this from Todo to Done in asyncioon Dec 18, 2025
  11. added a commit that references this issue on Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.133.143.15stdlibtopic-asynciotopic-repltype-bug

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions