8000 gh-133653: Fix argparse.ArgumentParser with the formatter_class argument by serhiy-storchaka · Pull Request #133813 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content
8000

gh-133653: Fix argparse.ArgumentParser with the formatter_class argument #133813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

serhiy-storchaka
Copy link
Member
@serhiy-storchaka serhiy-storchaka commented May 10, 2025
  • 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.

… argument

* 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.
Copy link
Member
@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request May 11, 2025
Skip the help tests for now. Not ideal but it's not too bad and it's
not pygments-specific anyway.

Bug: python/cpython#133653
Bug: python/cpython#133813
Signed-off-by: Sam James <sam@gentoo.org>
tanuki-no pushed a commit to tanuki-no/gentoo that referenced this pull request May 12, 2025
Skip the help tests for now. Not ideal but it's not too bad and it's
not pygments-specific anyway.

Bug: python/cpython#133653
Bug: python/cpython#133813
Signed-off-by: Sam James <sam@gentoo.org>
@serhiy-storchaka serhiy-storchaka merged commit 734e15b into python:main May 12, 2025
43 checks passed
@miss-islington-app
Copy link

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@serhiy-storchaka serhiy-storchaka deleted the argparse-custom-formatter branch May 12, 2025 17:27
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 12, 2025
… argument (pythonGH-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.
(cherry picked from commit 734e15b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app
Copy link
bedevere-app bot commented May 12, 2025

GH-133941 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label May 12, 2025
serhiy-storchaka added a commit that referenced this pull request May 12, 2025
…s 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 734e15b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0