This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mrabarnett
Recipients anmyachev, ezio.melotti, mrabarnett, vstinner
Date 2021-10-13.16:25:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
It can be shortened to this:

buffer = b"a" * 8191 + b"\\r\\n"

with open("bug_csv.csv", "wb") as f:

with open("bug_csv.csv", encoding="unicode_escape", newline="") as f:

To me it looks like it's reading in blocks of 8K and then decoding them,  but it isn't correctly handling an escape sequence that happens to cross a block boundary.
Date User Action Args
2021-10-13 16:25:23mrabarnettsetrecipients: + mrabarnett, vstinner, ezio.melotti, anmyachev
2021-10-13 16:25:23mrabarnettsetmessageid: <>
2021-10-13 16:25:23mrabarnettlinkissue45461 messages
2021-10-13 16:25:23mrabarnettcreate