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 — Add new Python 3.14 `argparse.ArgumentParser` constructor parameters by edgarrmondragon · Pull Request #13947 · python/typeshed

Conversation

@edgarrmondragon

@edgarrmondragon edgarrmondragon commented May 6, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

These are

  • suggest_on_error, added by GH-99749: Add optional feature to suggest correct names (ArgumentParser) cpython#124456, made keyword-only by gh-133300: argparse: make suggest_on_error a keyword-only parameter cpython#133302
  • color, added by gh-130645: Add colour to argparse help cpython#132323
  • gh-133653: Fix argparse.ArgumentParser with the formatter_class argument cpython#133813

Sorry, something went wrong.

Uh oh!

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

All reactions
edgarrmondragon added 2 commits May 5, 2025 19:36
@edgarrmondragon
Add new Python 3.14 argparse.ArgumentParser parameters
6ffa4ab
These are

- `suggest_on_error`, added by python/cpython#124456, made keyword-only by python/cpython#133302
- `color`, added by python/cpython#132323
@edgarrmondragon
Annotate instance attributes
271997f
@JelleZijlstra

JelleZijlstra commented May 6, 2025

Copy link
Copy Markdown
Member

Our policy is generally to not add features for new Python versions until the first beta, but that's tomorrow so I think it's fine to get this in.

edgarrmondragon reacted with rocket emoji
All reactions
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

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

@github-actions

This comment has been minimized.

Sign in to view
@srittau
Merge branch 'main' into 3.14-argparse-parameters
ffca419
@github-actions

This comment has been minimized.

Sign in to view
JelleZijlstra
JelleZijlstra reviewed May 10, 2025
View reviewed changes
Comment thread stdlib/argparse.pyi Outdated
Comment on lines +720 to +721
suggest_on_error: bool = ...,
color: bool = ...,

@JelleZijlstra JelleZijlstra May 10, 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
suggest_on_error: bool = ...,
color: bool = ...,
suggest_on_error: bool = False,
color: bool = False,

I think we didn't fill in defaults here because at runtime they go through **kwargs. Let's add defaults for the new parameters at least, and if you like we can add defaults for the rest at some point too.

Sorry, something went wrong.

Uh oh!

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

edgarrmondragon reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@edgarrmondragon edgarrmondragon May 12, 2025

Copy link
Copy Markdown
Contributor Author

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.

Would you prefer if I add the missing defaults in this PR or in a separate one?

Sorry, something went wrong.

Uh oh!

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

All reactions

@JelleZijlstra JelleZijlstra May 12, 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.

Let's do it in another PR, I'll merge this one

Sorry, something went wrong.

Uh oh!

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

edgarrmondragon reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
edgarrmondragon and others added 3 commits May 11, 2025 21:18
@edgarrmondragon @JelleZijlstra
Add defaults to add_parser
98b2340
Co-authored-by: Jelle Zijlstra <[email protected]>
@edgarrmondragon
Merge branch 'main' into 3.14-argparse-parameters
0e7c6e1
@edgarrmondragon
if -> elif
6b6659c
@github-actions

github-actions Bot commented May 12, 2025

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

All reactions

Sorry, something went wrong.

Uh oh!

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

@JelleZijlstra
JelleZijlstra merged commit 3f8a48f into python:main May 12, 2025
@edgarrmondragon
edgarrmondragon deleted the 3.14-argparse-parameters branch May 12, 2025 18:56
mmingyu pushed a commit to mmingyu/typeshed that referenced this pull request May 16, 2025
@edgarrmondragon @srittau
@JelleZijlstra mingyu.park
Add new Python 3.14 argparse.ArgumentParser constructor parameters (p…
fc6a13f
…ython#13947)

These are

- `suggest_on_error`, added by python/cpython#124456, made keyword-only by python/cpython#133302
- `color`, added by python/cpython#132323

Co-authored-by: Sebastian Rittau <[email protected]>
Co-authored-by: Jelle Zijlstra <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@JelleZijlstra JelleZijlstra JelleZijlstra left review comments

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.

3 participants

@edgarrmondragon @JelleZijlstra @srittau
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.