]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-125355: Rewrite parse_intermixed_args() in argparse (GH-125356) (GH-125834)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 22 Oct 2024 12:58:05 +0000 (14:58 +0200)
committerGitHub <noreply@github.com>
Tue, 22 Oct 2024 12:58:05 +0000 (15:58 +0300)
commit1fe63b15eb1417503eeba2c638f7296a67eb580c
treee1eb4bb6fd0f9ab798794f0f7a1a78cd07bfa03c
parente3bfe1e756d2eb3d02daadcc3579b08c99b20dbf
[3.13] gh-125355: Rewrite parse_intermixed_args() in argparse (GH-125356) (GH-125834)

* 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)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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]