Skip to content

gh-146589: Fix raw buffer merge in UnixConsole.getpending()#146590

Closed
cuiweixie wants to merge 1 commit intopython:mainfrom
cuiweixie:fix-pyrepl-getpending-raw
Closed

gh-146589: Fix raw buffer merge in UnixConsole.getpending()#146590
cuiweixie wants to merge 1 commit intopython:mainfrom
cuiweixie:fix-pyrepl-getpending-raw

Conversation

@cuiweixie
Copy link
Copy Markdown
Contributor

Summary

Fixes gh-146589.

When getpending() merges consecutive events from the queue, e.raw was
updated with e.raw += e.raw instead of appending the second event's bytes.
Use e.raw += e2.raw, consistent with e.data += e2.data.

Test plan

  • Exercise pyrepl on Unix with pending input coalescing (manual), or run
    relevant _pyrepl tests if present.

When coalescing queued input events, append e2.raw to e.raw instead of
duplicating e.raw (e.raw += e.raw was incorrect).
@picnixz
Copy link
Copy Markdown
Member

picnixz commented Mar 29, 2026

Closing because we don't have a consensus yet in the original issue #145886.

@picnixz picnixz closed this Mar 29, 2026
@picnixz
Copy link
Copy Markdown
Member

picnixz commented Mar 29, 2026

In addition, don't use AI to generate PRs or we will restrict your access should this be overused. TiA.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_pyrepl: Fix raw buffer merge when coalescing pending input events

2 participants