]> granicus.if.org Git - python/commit
bpo-33109: argparse subparsers are once again not required by default (GH-6919) ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 24 May 2018 02:22:46 +0000 (19:22 -0700)
committerNed Deily <nad@python.org>
Thu, 24 May 2018 02:22:46 +0000 (22:22 -0400)
commitdd7a255911f364cf521676082a89d4cac307737e
tree33a5b6d5f3a0d2e68bead61ee27325caf5223c4a
parentfa286edbde9ed660d99628aea14ee3b824c2afe6
bpo-33109: argparse subparsers are once again not required by default (GH-6919) (GH-7089)

bpo-26510 in 3.7.0a2 changed the behavior of argparse to make
subparsers required by default, returning to the behavior of 2.7
and 3.2. The behavior was changed in 3.3 to be no longer required.
While it might make more sense to have the default to required,
compatibility with 3.3 through 3.6 is probably less disruptive
than trying to reintroduce compatibility with 2.7 at this point.
This change restores the 3.6 behavior.
(cherry picked from commit 8ebf5ceb0f5408d1ebc26c19702ac0762ef5ea04)

Co-authored-by: Ned Deily <nad@python.org>
Doc/library/argparse.rst
Lib/argparse.py
Lib/test/test_argparse.py
Misc/NEWS.d/3.7.0a2.rst
Misc/NEWS.d/next/Library/2018-05-16-14-57-58.bpo-33109.nPLL_S.rst [new file with mode: 0644]