Skip to content

_pyrepl: switch console refresh to structured rendered screens #148105

Closed

Description

@pablogsal

Bug report

The _pyrepl refresh path tangles screen generation, layout math, and terminal I/O together. Both Unix and Windows consoles independently reconstruct what changed from raw string lists, duplicating layout logic. Style metadata is discarded mid-pipeline, blocking richer theme support. A single dirty flag triggers full recomputation even when only an overlay or prompt changed. Completions are spliced into source content rather than layered on top, complicating cache invalidation. Prompt selection also breaks on wrapped lines because the cached rendered-row count is used where a logical line number is expected.

Additionally, because there is no line-level diffing, unchanged lines are fully redrawn every refresh cycle, causing visible flickering in terminals like Ghostty.

Linked PRs

Activity

  1. self-assigned this
    on Apr 4, 2026
  2. added
    type-bugAn unexpected behavior, bug, or error
    topic-replRelated to the interactive shell
    type-refactorCode refactoring (with no changes in behavior)
    on Apr 4, 2026
  3. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Apr 4, 2026
  4. added
    type-bugAn unexpected behavior, bug, or error
    and removed
    type-bugAn unexpected behavior, bug, or error
    on Apr 7, 2026
  5. added a commit that references this issue on Apr 8, 2026
  6. added a commit that references this issue on Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

stdlibStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errortype-refactorCode refactoring (with no changes in behavior)

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions