[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7c722e32bf582108680f49983cf01eaed710ddb9 by Serhiy Storchaka in branch '3.9': [3.9] bpo-45461: Fix IncrementalDecoder and StreamReader in the "unicode-escape" codec (GH-28939) (GH-28945)

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0bff4ccbfd3297b0adf690655d3e9ddb0033bc69 by Miss Islington (bot) in branch '3.10': [3.10] bpo-45461: Fix IncrementalDecoder and StreamReader in the "unicode-escape" codec (GH-28939) (GH-28943)

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +27233 pull_request: https://github.com/python/cpython/pull/28945 ___ Python tracker ___

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset c96d1546b11b4c282a7e21737cb1f5d16349656d by Serhiy Storchaka in branch 'main': bpo-45461: Fix IncrementalDecoder and StreamReader in the "unicode-escape" codec (GH-28939)

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-14 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +27231 pull_request: https://github.com/python/cpython/pull/28943 ___ Python tracker

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-13 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +27228 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28939 ___ Python tracker

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-13 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> serhiy.storchaka versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8 ___ Python tracker ___

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-13 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-13 Thread Matthew Barnett
Matthew Barnett added the comment: It can be shortened to this: buffer = b"a" * 8191 + b"\\r\\n" with open("bug_csv.csv", "wb") as f: f.write(buffer) with open("bug_csv.csv", encoding="unicode_escape", newline="") as f: f.readline() To me it looks like it's reading in blocks of 8K

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-13 Thread Anatoly Myachev
Anatoly Myachev added the comment: Hello! I can reduce it a little. The buffer shoudln't be decreased, as it seems there is a some kind relation with the buffer size for IO operations. buffer =

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-13 Thread STINNER Victor
STINNER Victor added the comment: Can you please try write a simpler (shorter) reproducer? -- ___ Python tracker ___ ___

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-13 Thread Anatoly Myachev
New submission from Anatoly Myachev : Expected behavior - if `read()` function works correctly, then `readline()` should also works. Reproducer in file - just run: `python test.py`. Traceback (most recent call last): File "test.py", line 11, in f.readline() File