Skip to content

gh-72406: Document argument ordering in argparse help output#148534

Merged
savannahostrowski merged 5 commits intopython:mainfrom
santihdzs:gh-72406-argparse-help-order
Apr 14, 2026
Merged

gh-72406: Document argument ordering in argparse help output#148534
savannahostrowski merged 5 commits intopython:mainfrom
santihdzs:gh-72406-argparse-help-order

Conversation

@santihdzs
Copy link
Copy Markdown
Contributor

@santihdzs santihdzs commented Apr 13, 2026

Document that within each argument group, arguments are displayed in help output in the order in which they are added.


📚 Documentation preview 📚: https://cpython-previews--148534.org.readthedocs.build/

@python-cla-bot
Copy link
Copy Markdown

python-cla-bot bot commented Apr 13, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

Copy link
Copy Markdown
Member

@savannahostrowski savannahostrowski left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I think this note would fit more naturally in the "Argument groups" section (around line 2033), since that's where help display grouping is already discussed. It could go right after the "Note that any arguments not in your user-defined groups..." paragraph.

Also, a NEWS entry isn't needed for a small docs clarification like this (the CI check will pass once I add the skip news label).

@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 13, 2026

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@santihdzs
Copy link
Copy Markdown
Contributor Author

Hello! I have made the requested changes; please review again. Thanks!

@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 14, 2026

Thanks for making the requested changes!

@savannahostrowski: please review the changes made to this pull request.

Copy link
Copy Markdown
Member

@savannahostrowski savannahostrowski left a comment

Choose a reason for hiding this comment

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

Thanks!

@savannahostrowski savannahostrowski enabled auto-merge (squash) April 14, 2026 16:18
@savannahostrowski savannahostrowski merged commit 4286227 into python:main Apr 14, 2026
30 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Apr 14, 2026
@miss-islington-app
Copy link
Copy Markdown

Thanks @santihdzs for the PR, and @savannahostrowski for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 14, 2026
…ythonGH-148534)

(cherry picked from commit 4286227)

Co-authored-by: Santi Hernandez <santi@santihdzs.com>
Co-authored-by: Savannah Ostrowski <savannah@python.org>
@miss-islington-app
Copy link
Copy Markdown

Sorry, @santihdzs and @savannahostrowski, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 4286227308ee8dafc867062df4cad73af2a84696 3.13

@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 14, 2026

GH-148562 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 Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir needs backport to 3.13 bugs and security fixes skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants