summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2017-09-20 21:35:27 (GMT)
committerÉric Araujo <merwok@users.noreply.github.com>2017-09-20 21:35:27 (GMT)
commitaaf6fc0982c916cb71d9e0afcd7dda4ba495793b (patch)
tree09cb0078fade182a8be0a108bb50b57a71156bd9 /Misc
parent19e4d9346db7fb65845b98a9cb9caacaaac8a81a (diff)
downloadcpython-aaf6fc0982c916cb71d9e0afcd7dda4ba495793b.zip
cpython-aaf6fc0982c916cb71d9e0afcd7dda4ba495793b.tar.gz
cpython-aaf6fc0982c916cb71d9e0afcd7dda4ba495793b.tar.bz2
bpo-26510: make argparse subparsers required by default (#3027)
This fixes a regression from Python 2. To get optional subparsers, use the new parameter ``add_subparsers(required=False)``. Patch by Anthony Sottile.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2017-09-19-13-29-29.bpo-26510.oncW6V.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2017-09-19-13-29-29.bpo-26510.oncW6V.rst b/Misc/NEWS.d/next/Library/2017-09-19-13-29-29.bpo-26510.oncW6V.rst
new file mode 100644
index 0000000..26a6b4b
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2017-09-19-13-29-29.bpo-26510.oncW6V.rst
@@ -0,0 +1,3 @@
+argparse subparsers are now required by default. This matches behaviour in Python 2.
+For optional subparsers, use the new parameter ``add_subparsers(required=False)``.
+Patch by Anthony Sottile.