SIGN IN SIGN UP

[3.12] gh-111942: Fix SystemError in the TextIOWrapper constructor (GH-112061) (GH-112089)

In non-debug more the check for the "errors" argument is skipped,
and then PyUnicode_AsUTF8() can fail, but its result was not checked.

Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit 9302f05f9af07332c414b3c19003efd1b1763cf3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
V
Victor Stinner committed
1445d77282f9082f3fecde772ddf6bb2f5a383f1
Parent: 91a33fd
Committed by GitHub <noreply@github.com> on 11/15/2023, 1:55:46 PM