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