GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-133653: Fix argparse.ArgumentParser with the formatter_class argument by serhiy-storchaka · Pull Request #133813 · python/cpython

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented May 10, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • 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.
  • Issue: argparse.HelpFormatter subclasses may be broken by 3.14 changes #133653

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

edgarrmondragon and befeleme reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
@serhiy-storchaka
pythongh-133653: Fix argparse.ArgumentParser with the formatter_class…
ef5d142
… 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.
@serhiy-storchaka
serhiy-storchaka requested a review from savannahostrowski as a code owner May 10, 2025 09:22
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.14 bugs and security fixes label May 10, 2025
@bedevere-app bedevere-app Bot mentioned this pull request May 10, 2025
argparse.HelpFormatter subclasses may be broken by 3.14 changes #133653
Closed
@bedevere-app bedevere-app Bot added the awaiting core review label May 10, 2025
@serhiy-storchaka
Remove the prefix_chars parameter of HelpFormatter.
049676d
@serhiy-storchaka
serhiy-storchaka requested a review from hugovk May 10, 2025 09:49
@serhiy-storchaka serhiy-storchaka mentioned this pull request May 10, 2025
gh-133653: Fix subclassing HelpFormatter #133668
Closed
hugovk
hugovk approved these changes May 10, 2025
View reviewed changes

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels May 10, 2025
gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request May 11, 2025
@thesamesam
dev-python/pygments: enable py3.14
92d1c6b
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 <[email protected]>
tanuki-no pushed a commit to tanuki-no/gentoo that referenced this pull request May 12, 2025
@thesamesam @tanuki-no
dev-python/pygments: enable py3.14
b73bf53
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 <[email protected]>
@edgarrmondragon edgarrmondragon mentioned this pull request May 12, 2025
Add new Python 3.14 argparse.ArgumentParser constructor parameters python/typeshed#13947
Merged
@serhiy-storchaka
serhiy-storchaka merged commit 734e15b into python:main May 12, 2025
@miss-islington-app

miss-islington-app Bot commented May 12, 2025

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label May 12, 2025
@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
@serhiy-storchaka @miss-islington
pythongh-133653: Fix argparse.ArgumentParser with the formatter_class…
74c8bce
… 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 <[email protected]>
@bedevere-app

bedevere-app Bot commented May 12, 2025

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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
@miss-islington @serhiy-storchaka
[3.14] gh-133653: Fix argparse.ArgumentParser with the formatter_clas…
c15980b
…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 <[email protected]>
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
@serhiy-storchaka @Pranjal095
pythongh-133653: Fix argparse.ArgumentParser with the formatter_class…
b966a9e
… 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.
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
@serhiy-storchaka @taegyunkim
pythongh-133653: Fix argparse.ArgumentParser with the formatter_class…
c171c58
… 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@hugovk hugovk hugovk approved these changes
@savannahostrowski savannahostrowski Awaiting requested review from savannahostrowski savannahostrowski is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@serhiy-storchaka @hugovk
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.