GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||
GeezerVison is showing github.com — GH-130750: Restore quoting of choices in argparse error messages to match documentation and improve clarity by savannahostrowski · Pull Request #144983 · python/cpython Conversation
|
|
@serhiy-storchaka Mind taking a look at this one, since you were involved in the merge of the PR that changed this display? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Looking how is this handled in other programs. On Linux: On FreeBSD: Both quote the invalid value, but do not quote the list of valid values. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
There are also plenty of command-line tools that do quote valid choices in error messages, so it's a mixed bag across the ecosystem, I think. My preference would be to restore the previous quoting behavior here. The PR that changed the display wasn't really about removing quotes; it was about fixing StrEnum, and the loss of quotes was an acknowledged side effect. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Well, argparce deviated enough from the original getopt.c, so we can not follow it in this particular detail.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM. 👍
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Thanks @savannahostrowski for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, @savannahostrowski, I could not cleanly backport this to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, @savannahostrowski, I could not cleanly backport this to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-149385 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-149386 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The fix from #45 needs fixing for an upstream fix to the original fix: python/cpython#144983.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.