]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-101640: Make argparse _print_message catch any write error (GH-101802)...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 6 May 2023 23:17:27 +0000 (16:17 -0700)
committerGitHub <noreply@github.com>
Sat, 6 May 2023 23:17:27 +0000 (23:17 +0000)
commitcf1c25fd6e38df682a9de2e06e87ee3c6b63f4d7
treecf02f439dddf958ce65f77d41b6cadcd4a0f3bd9
parent10ee19b7371e333f1e22c9471b61954485f2268c
[3.11] gh-101640: Make argparse _print_message catch any write error (GH-101802) (#104250)

gh-101640: Make argparse _print_message catch any write error (GH-101802)

* In particular, don't exit when trying to print to stderr = None.
* Add tests

(cherry picked from commit 42f54d1f9244784fec99e0610aa05a5051e594bb)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Lib/argparse.py
Lib/test/test_argparse.py
Misc/NEWS.d/next/Library/2023-02-09-22-24-34.gh-issue-101640.oFuEpB.rst [new file with mode: 0644]