]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-101640: Make argparse _print_message catch any write error (#101802)
authorOleg Iarygin <oleg@arhadthedev.net>
Sat, 6 May 2023 22:53:48 +0000 (02:53 +0400)
committerGitHub <noreply@github.com>
Sat, 6 May 2023 22:53:48 +0000 (18:53 -0400)
commit42f54d1f9244784fec99e0610aa05a5051e594bb
tree9261147628e5c1543fc8d3784e34ad4dd5edaa58
parent92d8bfffbf377e91d8b92666525cb8700bb1d5e8
gh-101640: Make argparse _print_message catch any write error (#101802)

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

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]