Skip to content

_pyrepl: Fix raw buffer merge when coalescing pending input events #146589

@cuiweixie

Description

@cuiweixie

Problem

In UnixConsole.getpending() (Lib/_pyrepl/unix_console.py), when draining the event queue and merging consecutive events into e, the code appends to e.raw with e.raw += e.raw instead of appending the second event's payload. That duplicates the first chunk instead of concatenating e2.raw.

Proposed fix

Use e.raw += e2.raw to match e.data += e2.data.

Linked 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