New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-46080: Fix crash when argparse.BooleanOptionalAction is used with default=argparse.SUPPRESS and help specified #30111
Conversation
… default=argparse.SUPPRESS and help specified.
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
Misc/NEWS.d/next/Library/2021-12-15-06-29-00.bpo-46080.AuQpLt.rst
Outdated
Show resolved
Hide resolved
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 |
Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
Thanks @felixfontein for the PR, and @taleinat for merging it |
…nGH-30111) Fix an uncaught exception during help text generation when argparse.BooleanOptionalAction is used with default=argparse.SUPPRESS and help is specified. (cherry picked from commit 9e87c0e) Co-authored-by: Felix Fontein <felix@fontein.de>
GH-30730 is a backport of this pull request to the 3.10 branch. |
…nGH-30111) Fix an uncaught exception during help text generation when argparse.BooleanOptionalAction is used with default=argparse.SUPPRESS and help is specified. (cherry picked from commit 9e87c0e) Co-authored-by: Felix Fontein <felix@fontein.de>
GH-30731 is a backport of this pull request to the 3.9 branch. |
) Fix an uncaught exception during help text generation when argparse.BooleanOptionalAction is used with default=argparse.SUPPRESS and help is specified. (cherry picked from commit 9e87c0e) Co-authored-by: Felix Fontein <felix@fontein.de>
) Fix an uncaught exception during help text generation when argparse.BooleanOptionalAction is used with default=argparse.SUPPRESS and help is specified. (cherry picked from commit 9e87c0e) Co-authored-by: Felix Fontein <felix@fontein.de>
@taleinat thanks for reviewing and merging this! |
…nGH-30111) Fix an uncaught exception during help text generation when argparse.BooleanOptionalAction is used with default=argparse.SUPPRESS and help is specified. (cherry picked from commit 9e87c0e) Co-authored-by: Felix Fontein <felix@fontein.de>
When
argparse.BooleanOptionalAction
is used withdefault=argparse.SUPPRESS
andhelp
specified, help text composition currently crashes. This PR fixes that by also checking whetherdefault is not SUPPRESS
before appending%(default)s
tohelp
.https://bugs.python.org/issue46080