]> 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>
Sun, 21 Feb 2021 23:29:30 +0000 (08:29 +0900)
committerGitHub <noreply@github.com>
Sun, 21 Feb 2021 23:29:30 +0000 (08:29 +0900)
commit01806d5beba3d208bb56adba6829097d803bf54f
tree3d843f7b0c03e7e8b0511a523e0f71251bc587bd
parent84f7afe65c29330f3ff8e318e054b96554a2dede
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
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