◐ Shell
reader mode source ↗
Skip to content

gh-84116: Docs: Document help and aliases for argparse.add_parser()#140574

Merged
savannahostrowski merged 64 commits into
python:mainfrom
Krishna-web-hub:doc-fix-84116
Feb 6, 2026
Merged

gh-84116: Docs: Document help and aliases for argparse.add_parser()#140574
savannahostrowski merged 64 commits into
python:mainfrom
Krishna-web-hub:doc-fix-84116

Conversation

@Krishna-web-hub

@Krishna-web-hub Krishna-web-hub commented Oct 25, 2025

Copy link
Copy Markdown
Contributor

gh-84116: Doc: update the argparse documentation to clearly define the help and aliases parameters for add_parser() and added the required news file for this change.

Doc/library/argparse.rst

Replaced the vague, single-sentence description of _SubParsersAction.add_parser with a formal .. method:: directive.

This new directive explicitly lists help and aliases as parameters, along with descriptions of what they do.

Removed the old, redundant paragraphs about help (which was in parentheses) and aliases (which was a "Furthermore..." note) from later in the document. This centralizes all the information in one logical place.

Misc/NEWS.d/next/Library/...

Added the required "blurb" file to log this documentation fix.


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

@StanFromIreland StanFromIreland changed the title Doc fix 84116Docs: Document help and aliases for argparse.add_parser() (gh-84116) #84116 Oct 25, 2025

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

There seem to be two different things mixed in this PR, please split it.

166 hidden items Load more…
@Krishna-web-hub

Krishna-web-hub commented Jan 16, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @picnixz , for your effort for correcting me, for the mistake i am making. And i am very sorry for being impatient. I will keep it in my mind. And i was just being confused as it is sort of new for me, but i never want to disrespect you.

@picnixz picnixz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

Some final comments. Otherwise I think we can merge it.

Krishna-web-hub and others added 5 commits January 18, 2026 11:41
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@Krishna-web-hub

Copy link
Copy Markdown
Contributor Author

@picnixz Added all the changes you have requested for.

@picnixz

picnixz commented Jan 19, 2026

Copy link
Copy Markdown
Member

(Btw the major changes I requested are addressed so this is in a mergeable state should I say).

@picnixz picnixz dismissed their stale review February 1, 2026 17:55

Changes were addressed.

@Krishna-web-hub

Copy link
Copy Markdown
Contributor Author

Hello @savannahostrowski the previous issue of two commit is being merged due to some issue in the branch and the documentation of free threading is merged in pr #140566. So if you please review the whole commit of this pr and tell me what else you need I can work according to it.

@Krishna-web-hub

Krishna-web-hub commented Feb 2, 2026

Copy link
Copy Markdown
Contributor Author

Hello @StanFromIreland The commits are already splited. please check out the changes done and tell me what else you need to be changed in the documentation

Hide details View details @savannahostrowski savannahostrowski merged commit 74db440 into python:main Feb 6, 2026
29 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Feb 6, 2026
@savannahostrowski

savannahostrowski commented Feb 6, 2026

Copy link
Copy Markdown
Member

Oops, I forgot to officially hit the approve button after reviewing this/before merging, that's my bad. I think we should close this one out and tackle any minor follow ups etc. in other PRs since this has been ongoing for quite awhile.

Thanks a lot for all the back and forth here @picnixz! Much appreciated.

@hugovk

hugovk commented Feb 6, 2026

Copy link
Copy Markdown
Member

Tip for next time, let's try and avoid listing all the cleanup commits in the squashed message, but keep the Co-authored-by trailers at the end:

74db440

(I use Refined GitHub which usually clears all that out.)

Thanks!

@savannahostrowski

Copy link
Copy Markdown
Member

Ah yeah, I forgot to do that too. I typically remember but I guess I'm just off my game today. Sorry!

@Krishna-web-hub Krishna-web-hub deleted the doc-fix-84116 branch February 7, 2026 19:04
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
…er() (python#140574)

* pythongh-140281: Doc: Update free-threading how-to

* pythongh-140281: Doc: Update free-threading how-to

* Fix trailing whitespace

* doc fixing of the cpython fixes#84116

* Docs: Document help and aliases for argparse.add_parser() (pythongh-84116)

* Docs: Document help and aliases for argparse.add_parser() (pythongh-84116)

* Fix trailing whitespace

* Fix trailing whitespace

* Fix trailing whitespace

* Fix trailing whitespace

* Fix trailing whitespace

* Fix trailing whitespace

* Fix trailing errors

* Fix trailing errors and spaces

* Fix docutils formatting, NEWS ref, and trailing whitespace

* Docs: Update argparse.rst and add NEWS entry

* Delete Doc/howto/free-threading-python.rst

* Delete Misc/NEWS.d/next/Documentation/2025-10-25-00-49-43.gh-issue-140281.tuMQUe.rst

* adding the depreceated tag

* The error indexing was fixed

* Fix trailing whitespace

* Restore missing free-threading documentation

* fixing some minor error

* fixing some minor error part 2

* fixing some minor error part 3

* Fix NEWS entry format

* Final cleanup of NEWS entry format 2

* changes in the argparse.rst

* Remove unnecessary NEWS entry

* Fixing the issue as requested

* Added the Changes done before.

* done the changes

* done the changes#1

* Apply suggestion from @picnixz

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* Apply suggestion from @picnixz

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* Done the changes

* Done the new changes

* The versionadded is rectified

* Update Doc/library/argparse.rst

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>

* Docs editing

* Docs fixing whitespace

* Docs rectifiying

* little bit rectification

* Indentation rectification

* Indentation rectification 1

* Apply suggestion from @picnixz

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* deprecated rectification

* Remove mistakenly added NEWS entry

* Update Doc/library/argparse.rst

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* changes python#1

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* Update Doc/library/argparse.rst 2

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* removed useless thing

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* changed according to the request

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* Updated the test part

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
…er() (python#140574)

* pythongh-140281: Doc: Update free-threading how-to

* pythongh-140281: Doc: Update free-threading how-to

* Fix trailing whitespace

* doc fixing of the cpython fixes#84116

* Docs: Document help and aliases for argparse.add_parser() (pythongh-84116)

* Docs: Document help and aliases for argparse.add_parser() (pythongh-84116)

* Fix trailing whitespace

* Fix trailing whitespace

* Fix trailing whitespace

* Fix trailing whitespace

* Fix trailing whitespace

* Fix trailing whitespace

* Fix trailing errors

* Fix trailing errors and spaces

* Fix docutils formatting, NEWS ref, and trailing whitespace

* Docs: Update argparse.rst and add NEWS entry

* Delete Doc/howto/free-threading-python.rst

* Delete Misc/NEWS.d/next/Documentation/2025-10-25-00-49-43.gh-issue-140281.tuMQUe.rst

* adding the depreceated tag

* The error indexing was fixed

* Fix trailing whitespace

* Restore missing free-threading documentation

* fixing some minor error

* fixing some minor error part 2

* fixing some minor error part 3

* Fix NEWS entry format

* Final cleanup of NEWS entry format 2

* changes in the argparse.rst

* Remove unnecessary NEWS entry

* Fixing the issue as requested

* Added the Changes done before.

* done the changes

* done the changes#1

* Apply suggestion from @picnixz

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* Apply suggestion from @picnixz

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* Done the changes

* Done the new changes

* The versionadded is rectified

* Update Doc/library/argparse.rst

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>

* Docs editing

* Docs fixing whitespace

* Docs rectifiying

* little bit rectification

* Indentation rectification

* Indentation rectification 1

* Apply suggestion from @picnixz

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* deprecated rectification

* Remove mistakenly added NEWS entry

* Update Doc/library/argparse.rst

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* changes python#1

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* Update Doc/library/argparse.rst 2

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* removed useless thing

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* changed according to the request

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* Updated the test part

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
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 skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

8 participants