]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-111942: Fix crashes in TextIOWrapper.reconfigure() (GH-111976) (GH-112059)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 15 Nov 2023 14:20:18 +0000 (15:20 +0100)
committerGitHub <noreply@github.com>
Wed, 15 Nov 2023 14:20:18 +0000 (14:20 +0000)
commite2421a36f0868e2c5eb492ca9e74ae3d7c37357e
treedc5b1e95870697110ba331abdcbbb08e22a06c55
parenta92b9e5b2b50638c1a01e0e7fe77c81148d74285
[3.11] gh-111942: Fix crashes in TextIOWrapper.reconfigure() (GH-111976) (GH-112059)

* 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]
Misc/NEWS.d/next/Library/2023-11-14-18-43-55.gh-issue-111942.x1pnrj.rst [new file with mode: 0644]
Modules/_io/textio.c