]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-126068: Fix exceptions in the argparse module (GH-126069)
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 30 Oct 2024 16:14:27 +0000 (18:14 +0200)
committerGitHub <noreply@github.com>
Wed, 30 Oct 2024 16:14:27 +0000 (18:14 +0200)
commitcc9a1839930d30450b12c460eee58137e3a3d6f1
treedb14b19fff9351f42b2819a76b6b98e5ba154cbd
parent1f16df4bfe5cfbe4ac40cc9c6d15f44bcfd99a64
gh-126068: Fix exceptions in the argparse module (GH-126069)

* Only error messages for ArgumentError and ArgumentTypeError are now
  translated.
* ArgumentError is now only used for command line errors, not for logical
  errors in the program.
* TypeError is now raised instead of ValueError for some logical errors.
Lib/argparse.py
Lib/test/test_argparse.py
Lib/test/translationdata/argparse/msgids.txt
Misc/NEWS.d/next/Library/2024-10-28-11-33-59.gh-issue-126068.Pdznm_.rst [new file with mode: 0644]