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-142928: Add deprecation warning for removal of `color` on `HelpFormatter` by savannahostrowski · Pull Request #142946 · python/cpython

Conversation

@savannahostrowski

@savannahostrowski savannahostrowski commented Dec 18, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Never documented and buggy but alas, still used, so we need a deprecation warning. More context here: #142274 (comment)

  • Issue: argparse.HelpFormatter color argument removed in 3.15.0a3 without deprecation #142928

Sorry, something went wrong.

Uh oh!

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

All reactions
savannahostrowski added 2 commits December 18, 2025 09:06
@savannahostrowski
Add deprecation warning for color
d82b48c
@savannahostrowski
Cleanup
cf98ebc
@savannahostrowski
savannahostrowski requested a review from hugovk December 18, 2025 17:09
@bedevere-app bedevere-app Bot added the awaiting core review label Dec 18, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Dec 18, 2025
argparse.HelpFormatter color argument removed in 3.15.0a3 without deprecation #142928
Closed
@savannahostrowski
Add to whats new
42e5f31
@savannahostrowski
savannahostrowski requested a review from AA-Turner as a code owner December 18, 2025 17:11
@blurb-it
📜🤖 Added by blurb_it.
0333f0e
@hroncok

hroncok commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

Thanks. Should this still attempt to call self._set_color(color) in this case? Or else if it cannot, say "deprecated and does nothing" in the warning/docs?

All reactions

Sorry, something went wrong.

Uh oh!

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

hugovk
hugovk reviewed Dec 18, 2025
View reviewed changes
Comment thread Doc/whatsnew/3.15.rst

* :mod:`argparse`:

* The *color* parameter of :class:`~argparse.HelpFormatter` is deprecated.

@hugovk hugovk Dec 18, 2025

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.

It's undocumented, fix the Sphinx warning:

Suggested change
* The *color* parameter of :class:`~argparse.HelpFormatter` is deprecated.
* The *color* parameter of :class:`!HelpFormatter` is deprecated.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Misc/NEWS.d/next/Library/2025-12-18-17-13-10.gh-issue-142928.bcgx78.rst
@@ -0,0 +1 @@
Deprecate :class:`~argparse.HelpFormatter`'s *color* parameter. Users should use the *color* parameter on :class:`~argparse.ArgumentParser` instead.

@hugovk hugovk Dec 18, 2025

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.

Suggested change
Deprecate :class:`~argparse.HelpFormatter`'s *color* parameter. Users should use the *color* parameter on :class:`~argparse.ArgumentParser` instead.
Deprecate :class:`!HelpFormatter`'s *color* parameter. Use the *color* parameter on :class:`~argparse.ArgumentParser` instead.

Sorry, something went wrong.

Uh oh!

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

All reactions
@savannahostrowski savannahostrowski closed this Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@hugovk hugovk hugovk left review comments
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner

Uh oh!

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

Assignees

No one assigned

Labels

awaiting core review

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.

3 participants

@savannahostrowski @hroncok @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.