gh-134970: Fix exception message in argparse module#134971
Merged
serhiy-storchaka merged 1 commit intopython:mainfrom Jun 1, 2025
Merged
gh-134970: Fix exception message in argparse module#134971serhiy-storchaka merged 1 commit intopython:mainfrom
argparse module#134971serhiy-storchaka merged 1 commit intopython:mainfrom
Conversation
Fix the "unknown action" exception in `argparse.ArgumentParser.add_argument_group()` to correctly replace the action class.
mgorny
added a commit
to mgorny/snakeoil
that referenced
this pull request
May 31, 2025
Loosen the argparse exception check to fix tests with Python 3.14. Starting with Python 3.14, the exception is supposed to use single quotes rather than double quotes. However, due to python/cpython#134971 it currently does not include the name at all -- an easy way to get compatibility for both quoting variants and to work around the bug is to not check the name at all. Signed-off-by: Michał Górny <mgorny@gentoo.org>
mgorny
added a commit
to mgorny/snakeoil
that referenced
this pull request
May 31, 2025
Loosen the argparse exception check to fix tests with Python 3.14. Starting with Python 3.14, the exception is supposed to use single quotes rather than double quotes. However, due to python/cpython#134971 it currently does not include the name at all -- an easy way to get compatibility for both quoting variants and to work around the bug is to not check the name at all. Signed-off-by: Michał Górny <mgorny@gentoo.org>
gentoo-bot
pushed a commit
to pkgcore/snakeoil
that referenced
this pull request
May 31, 2025
Loosen the argparse exception check to fix tests with Python 3.14. Starting with Python 3.14, the exception is supposed to use single quotes rather than double quotes. However, due to python/cpython#134971 it currently does not include the name at all -- an easy way to get compatibility for both quoting variants and to work around the bug is to not check the name at all. Signed-off-by: Michał Górny <mgorny@gentoo.org> Part-of: #105 Closes: #105 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
savannahostrowski
approved these changes
Jun 1, 2025
Member
savannahostrowski
left a comment
There was a problem hiding this comment.
Oh good catch, thanks for this!
Member
|
@ZeroIntensity I think this just needs a backport to 3.14, since this was something @serhiy-storchaka updated for alpha 2. |
serhiy-storchaka
approved these changes
Jun 1, 2025
|
Thanks @mgorny for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Jun 1, 2025
|
Sorry, @mgorny and @serhiy-storchaka, I could not cleanly backport this to |
|
GH-134991 is a backport of this pull request to the 3.14 branch. |
Member
Thanks, missed that. |
Pranjal095
pushed a commit
to Pranjal095/cpython
that referenced
this pull request
Jul 12, 2025
…34971) Fix the "unknown action" exception in argparse.ArgumentParser.add_argument_group() to correctly replace the action class.
taegyunkim
pushed a commit
to taegyunkim/cpython
that referenced
this pull request
Aug 4, 2025
…34971) Fix the "unknown action" exception in argparse.ArgumentParser.add_argument_group() to correctly replace the action class.
Agent-Hellboy
pushed a commit
to Agent-Hellboy/cpython
that referenced
this pull request
Aug 19, 2025
…34971) Fix the "unknown action" exception in argparse.ArgumentParser.add_argument_group() to correctly replace the action class.
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.
Fix the "unknown action" exception in
argparse.ArgumentParser.add_argument_group()to correctly replace the action class.