]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-133653: Fix argparse.ArgumentParser with the formatter_class argument (GH-133813)
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 12 May 2025 17:27:34 +0000 (20:27 +0300)
committerGitHub <noreply@github.com>
Mon, 12 May 2025 17:27:34 +0000 (20:27 +0300)
commit734e15b70dc044f57df4049a22dd769dffdb7d18
tree7fa6f1da3a9875f29bcc9bfc168861539022075c
parent14305a83d381ccdcae814abd9e2c28dda066720b
gh-133653: Fix argparse.ArgumentParser with the formatter_class argument (GH-133813)

* Fix TypeError when formatter_class is a custom subclass of
  HelpFormatter.
* Fix TypeError when formatter_class is not a subclass of
  HelpFormatter and non-standard prefix_char is used.
* Fix support of colorizing when formatter_class is not a subclass of
  HelpFormatter.
* Remove the prefix_chars parameter of HelpFormatter.
Lib/argparse.py
Lib/test/test_argparse.py
Misc/NEWS.d/next/Library/2025-05-10-12-06-55.gh-issue-133653.Gb2aG4.rst [new file with mode: 0644]