gh-90300: split --help output into separate options#30331
gh-90300: split --help output into separate options#30331merwok merged 33 commits intopython:mainfrom
Conversation
| ] | ||
| [ | ||
| .B \-X help | ||
| ] |
There was a problem hiding this comment.
I thought showing all help options on their own line could be nice.
|
When you're done making the requested changes, leave the comment: |
|
Thanks for working on this! I left some comments and suggestions. |
| if (option != NULL) { | ||
| return PyStatus_Error("Unknown value for option -X"); | ||
| return PyStatus_Error("Unknown value for option -X (see --help-xoptions)"); | ||
| } |
There was a problem hiding this comment.
Turns out that showing the invalid value in this error message is not trivial: real C programmers had issue with it too before #28823
| when the interpreter displays tracebacks.\n\ | ||
| -X frozen_modules=[on|off]: whether or not frozen modules should be used.\n\ | ||
| The default is \"on\" (or \"off\" if you are running a local build).\n\ | ||
| -X opt : set implementation-specific option\n\ |
There was a problem hiding this comment.
--help-xoptions is listed a few items below, but if scanning the list it might be helpful to explicitly mention it here. (Sorry if it's been suggested before & declined!).
| -X opt : set implementation-specific option\n\ | |
| -X opt : set implementation-specific option (see --help-xoptions)\n\ |
There was a problem hiding this comment.
I’ve added it and removed it. In the current version, I think it is not needed, as it is a few lines later and in the man page and shown in error message for unknown X option, but have no problem adding it if someone adds 👍🏽 to your comment 🙂
|
This is ready and complete for me. I did not change all lines to be <80 columns like Serhiy requested, but the upside is that the diff size is very reasonable. I would like to merge this week-end, or sooner if there are approving reviews, then create the backport PR for 3.11. |
|
Thanks @merwok for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
|
GH-93413 is a backport of this pull request to the 3.11 branch. |
|
🎉 Thanks for seeing this through, @merwok! It's a nice improvement. 😄 |
gh-90300: Make --help output shorter and add new help options.
--help-env, --help-xoptions and --help-all command-line options are
added to complement --help.