]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-111942: Fix crashes in TextIOWrapper.reconfigure() (GH-111976) (GH-112058)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 14 Nov 2023 16:15:10 +0000 (17:15 +0100)
committerGitHub <noreply@github.com>
Tue, 14 Nov 2023 16:15:10 +0000 (16:15 +0000)
commit24216d0530fda84b482ab29490ddd0d496605e43
tree21a8a75c5d8228862d040c23dfd7bfcb69ee0928
parentc003de946793fe2f4e168ba231ea4ee9e88cc3fe
[3.12] gh-111942: Fix crashes in TextIOWrapper.reconfigure() (GH-111976) (GH-112058)

* Fix crash when encoding is not string or None.
* Fix crash when both line_buffering and write_through raise exception
  when converted ti int.
* Add a number of tests for constructor and reconfigure() method
  with invalid arguments.

(cherry picked from commit ee06fffd38cb51ce1c045da9d8336d9ce13c318a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_io.py
Misc/NEWS.d/next/Library/2023-11-10-22-08-28.gh-issue-111942.MDFm6v.rst [new file with mode: 0644]
Modules/_io/textio.c