]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-133653: Fix argparse.ArgumentParser with the formatter_class argument ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 12 May 2025 17:54:07 +0000 (19:54 +0200)
committerGitHub <noreply@github.com>
Mon, 12 May 2025 17:54:07 +0000 (17:54 +0000)
commitc15980b57b411dd1492f8bfe68d5c87538bd006f
tree405797474234da608c6af3ffb0e7f48df6a25b76
parentc11fc4bc962337befe0326e7c902023e13daa2a0
[3.14] gh-133653: Fix argparse.ArgumentParser with the formatter_class argument (GH-133813) (GH-133941)

* 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.
(cherry picked from commit 734e15b70dc044f57df4049a22dd769dffdb7d18)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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]