Commit baace7f
gh-145886: Fix e.raw += e.raw typo in UnixConsole.getpending
In both variants of getpending(), the raw bytes from queued events
were being accumulated incorrectly: e.raw was being added to itself
instead of accumulating e2.raw from the dequeued event. This meant
the combined event's raw field would always be empty bytes (since it
starts as b"" and b"" + b"" is b"").
Fix the typo so that e.raw += e2.raw is used, matching the pattern
already used for e.data += e2.data on the preceding line.
Also add a test that verifies getpending correctly accumulates raw
bytes from multiple queued events.1 parent cd52172 commit baace7f
File tree
2 files changed
+29
-2
lines changed- Lib
- _pyrepl
- test/test_pyrepl
2 files changed
+29
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
545 | | - | |
| 545 | + | |
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
| |||
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
569 | | - | |
| 569 | + | |
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
0 commit comments