]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-43260: io: Prevent large data remains in textio buffer. (GH-24592)
authorInada Naoki <songofacandy@gmail.com>
Mon, 22 Feb 2021 01:32:55 +0000 (10:32 +0900)
committerGitHub <noreply@github.com>
Mon, 22 Feb 2021 01:32:55 +0000 (10:32 +0900)
commitd51436f95bf5978f82d917e53e9a456fdaa83a9d
tree079850b8608542c44004cb085438270a6d77b997
parent44fe32061d60f4bd9c4fa48c24e3e4ba26033dba
bpo-43260: io: Prevent large data remains in textio buffer. (GH-24592)

When very large data remains in TextIOWrapper, flush() may fail forever.

So prevent that data larger than chunk_size is remained in TextIOWrapper internal
buffer.

Co-Authored-By: Eryk Sun
(cherry picked from commit 01806d5)
Lib/test/test_io.py
Misc/NEWS.d/next/Library/2021-02-20-12-15-29.bpo-43260.6znAas.rst [new file with mode: 0644]
Modules/_io/textio.c