Commit f81a45e
committed
use bytes objects for read and write data
This changes the data type for the buffer of the read and write syscalls
from string to bytes. On Python 2, this has no effect. On Python 3, it
is a breaking change, but fixes a serious usibility bug that limits file
data to valid UTF-8 data. With these changes, files can contain arbitrary
data.1 parent 2c088b6 commit f81a45e
4 files changed
Lines changed: 19 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
520 | 529 | | |
521 | 530 | | |
522 | 531 | | |
523 | 532 | | |
524 | 533 | | |
525 | 534 | | |
| 535 | + | |
526 | 536 | | |
527 | 537 | | |
528 | 538 | | |
| |||
536 | 546 | | |
537 | 547 | | |
538 | 548 | | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
539 | 552 | | |
| 553 | + | |
540 | 554 | | |
541 | 555 | | |
542 | 556 | | |
| |||
0 commit comments