]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-125355: Rewrite parse_intermixed_args() in argparse (GH-125356) (GH-125839)
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 22 Oct 2024 13:23:30 +0000 (16:23 +0300)
committerGitHub <noreply@github.com>
Tue, 22 Oct 2024 13:23:30 +0000 (13:23 +0000)
commitda3d81d3ea94002bc81af2713f6f891ac8211289
tree439d5cd217fba1dcc25947527efe11ea09f28f0e
parent98a0b362b5a9fea5662003474a690ad415195bc1
[3.12] gh-125355: Rewrite parse_intermixed_args() in argparse (GH-125356) (GH-125839)

* 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 759a54d28ffe7eac8c23917f5d3dfad8309856be)
Lib/argparse.py
Lib/test/test_argparse.py
Misc/NEWS.d/next/Library/2024-10-22-13-28-00.gh-issue-125355.zssHm_.rst [new file with mode: 0644]