forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[3.12] pythongh-125355: Rewrite parse_intermixed_args() in argparse (p…
…ythonGH-125356) * The parser no longer changes temporarily during parsing. * Default values are not processed twice. * Required mutually exclusive groups containing positional arguments are now supported. * The missing arguments report now includes the names of all required optional and positional arguments. * Unknown options can be intermixed with positional arguments in parse_known_intermixed_args(). (cherry picked from commit 759a54d) Co-authored-by: Serhiy Storchaka <[email protected]>
- Loading branch information
1 parent
7a2bd3d
commit 3dbe0ae
Showing
3 changed files
with
81 additions
and
77 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
7 changes: 7 additions & 0 deletions
7
Misc/NEWS.d/next/Library/2024-10-22-13-28-00.gh-issue-125355.zssHm_.rst
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Fix several bugs in :meth:`argparse.ArgumentParser.parse_intermixed_args`. | ||
|
||
* The parser no longer changes temporarily during parsing. | ||
* Default values are not processed twice. | ||
* Required mutually exclusive groups containing positional arguments are now supported. | ||
* The missing arguments report now includes the names of all required optional and positional arguments. | ||
* Unknown options can be intermixed with positional arguments in parse_known_intermixed_args(). |