bpo-9694: Fix misleading phrase "optional arguments"#23858
Merged
Conversation
ericvsmith
reviewed
Dec 23, 2020
|
|
||
| We have introduced another action, "count", | ||
| to count the number of occurrences of a specific optional arguments: | ||
| to count the number of occurrences of a specific options: |
Member
There was a problem hiding this comment.
The old version has this issue, too: shouldn't this be singular "options", or maybe "occurrences of specific options" (omitting "a")?
Contributor
Author
There was a problem hiding this comment.
Yes, that makes sense.
ericvsmith
reviewed
Dec 23, 2020
ericvsmith
left a comment
Member
There was a problem hiding this comment.
Sorry I'm leaving this as two reviews: I pressed the wrong button on the first one.
Two little nits, otherwise looks good.
| @@ -0,0 +1 @@ | |||
| Argparse help no longer use the confusing phrase, "optional arguments". | |||
Member
There was a problem hiding this comment.
I think you should add: ', it now uses "options".'
adorilson
pushed a commit
to adorilson/cpython
that referenced
this pull request
Mar 13, 2021
mikelolasagasti
added a commit
to mikelolasagasti/sphinx-argparse
that referenced
this pull request
Nov 13, 2021
This PR changed the "optional arguments" to "optional" in 3.10, breaking some tests. python/cpython#23858
mikelolasagasti
added a commit
to mikelolasagasti/sphinx-argparse
that referenced
this pull request
Nov 13, 2021
This PR changed the "optional arguments" to "optional" in 3.10, breaking some tests. python/cpython#23858
inglor
added a commit
to inglor/in-toto
that referenced
this pull request
Dec 5, 2021
Optional Arguments was renamed to Options in python 3.10 release [1] [1]: python/cpython#23858 Signed-off-by: Leonidas Spyropoulos <artafinde@gmail.com>
inglor
added a commit
to inglor/in-toto
that referenced
this pull request
Dec 6, 2021
Optional Arguments was renamed to Options in python 3.10 release [1] [1]: python/cpython#23858 Signed-off-by: Leonidas Spyropoulos <artafinde@gmail.com>
eli-schwartz
added a commit
to mesonbuild/meson
that referenced
this pull request
Jan 25, 2022
In python/cpython#23858 the section header for option flags was changed from "optional arguments" to "options" with the rationale that they are not (necessarily) at all optional, while GNU coreutils calls them options. In fact, POSIX calls them options (-o) and option-arguments (-o val) and operands ("positional arguments") so it is indeed a mess, but argparse is not yet perfect. Still, fix the documentation generator for now so that it is compatible with python 3.10 as well. Fixes traceback on building the docs with: ``` [1/4] Generating gen_docs with a custom command FAILED: gen_docs.stamp /home/eschwartz/git/meson/docs/../tools/regenerate_docs.py --output-dir /home/eschwartz/git/meson/docs/builddir --dummy-output-file gen_docs.stamp Traceback (most recent call last): File "/home/eschwartz/git/meson/docs/../tools/regenerate_docs.py", line 160, in <module> regenerate_docs(output_dir=args.output_dir, File "/home/eschwartz/git/meson/docs/../tools/regenerate_docs.py", line 146, in regenerate_docs generate_hotdoc_includes(root_dir, output_dir) File "/home/eschwartz/git/meson/docs/../tools/regenerate_docs.py", line 113, in generate_hotdoc_includes cmd_data = get_commands_data(root_dir) File "/home/eschwartz/git/meson/docs/../tools/regenerate_docs.py", line 106, in get_commands_data cmd_data[cmd] = parse_cmd(cmd_output) File "/home/eschwartz/git/meson/docs/../tools/regenerate_docs.py", line 65, in parse_cmd assert arguments_start AssertionError ```
openstack-mirroring
pushed a commit
to openstack/python-glanceclient
that referenced
this pull request
Jan 12, 2023
First, fix test_help(). A commit[1], which first appeared in Python
3.10, changes the output of the help feature of argparse. Options used
to be in a section named "Optional arguments:", and they are now in a
section named "Options:".
Second, tox 4 changes the behaviour of tox, and
{toxinidir}/requirements.txt is no longer installed automagically in the
docs virtual environment. This causes autodoc to fail on some imports.
We explicitely add {toxinidir}/requirements.txt to the list of
dependencies to fix this issue.
These issues should be fixed in separate patches, but since they both
block the CI, they depend on each other.
[1] python/cpython#23858
Change-Id: Ia7866390b31f469bdea95624325a13aaf45a496e
Closes-Bug: #2002566
openstack-mirroring
pushed a commit
to openstack/openstack
that referenced
this pull request
Jan 12, 2023
* Update python-glanceclient from branch 'master'
to 6c95122777c8449056115292b492ec3e1e0d6e50
- Fix functional tests and docs generation
First, fix test_help(). A commit[1], which first appeared in Python
3.10, changes the output of the help feature of argparse. Options used
to be in a section named "Optional arguments:", and they are now in a
section named "Options:".
Second, tox 4 changes the behaviour of tox, and
{toxinidir}/requirements.txt is no longer installed automagically in the
docs virtual environment. This causes autodoc to fail on some imports.
We explicitely add {toxinidir}/requirements.txt to the list of
dependencies to fix this issue.
These issues should be fixed in separate patches, but since they both
block the CI, they depend on each other.
[1] python/cpython#23858
Change-Id: Ia7866390b31f469bdea95624325a13aaf45a496e
Closes-Bug: #2002566
tsibley
added a commit
to nextstrain/cli
that referenced
this pull request
Feb 27, 2023
The section heading used in argparse's formatted help output changed in 3.10¹, rendering --help equivalent to --help-all. This affected anyone with Nextstrain CLI installed on Python 3.10 or newer, including our standalone installation binaries. ¹ <python/cpython#23858> <https://bugs.python.org/issue9694>
3 tasks
tsibley
added a commit
to nextstrain/cli
that referenced
this pull request
Feb 28, 2023
The section heading used in argparse's formatted help output changed in 3.10¹, rendering --help equivalent to --help-all. This affected anyone with Nextstrain CLI installed on Python 3.10 or newer, including our standalone installation binaries. ¹ <python/cpython#23858> <https://bugs.python.org/issue9694>
tsibley
added a commit
to nextstrain/cli
that referenced
this pull request
Feb 28, 2023
The section heading used in argparse's formatted help output changed in 3.10¹, rendering --help equivalent to --help-all. This affected anyone with Nextstrain CLI installed on Python 3.10 or newer, including our standalone installation binaries. ¹ <python/cpython#23858> <https://bugs.python.org/issue9694>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
https://bugs.python.org/issue9694
I still need to change the examples in the main docs and add an introductory sentence or two explaining the terminology. Will wait until further discussions are complete before making those edits.