From eccc39224020fed75332ff69fce4d65665801821 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 9 Aug 2019 16:47:55 +0200 Subject: [PATCH 1/2] bpo-37803: pdb: fix handling of options (--help / --version) The "--" should not be included with long options passed to getopt.getopt. Fixes https://bugs.python.org/issue37803 --- Lib/pdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/pdb.py b/Lib/pdb.py index 69fd8bd6efb0e5..7c069612b4f9c2 100755 --- a/Lib/pdb.py +++ b/Lib/pdb.py @@ -1656,7 +1656,7 @@ def help(): def main(): import getopt - opts, args = getopt.getopt(sys.argv[1:], 'mhc:', ['--help', '--command=']) + opts, args = getopt.getopt(sys.argv[1:], 'mhc:', ['help', 'command=']) if not args: print(_usage) From 05640e9d15a15c87c72ed0ac0784ee2cc79972c5 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 12 Sep 2019 16:16:01 +0100 Subject: [PATCH 2/2] add blurb --- .../next/Tools-Demos/2019-09-12-16-15-55.bpo-37803.chEizy.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Tools-Demos/2019-09-12-16-15-55.bpo-37803.chEizy.rst diff --git a/Misc/NEWS.d/next/Tools-Demos/2019-09-12-16-15-55.bpo-37803.chEizy.rst b/Misc/NEWS.d/next/Tools-Demos/2019-09-12-16-15-55.bpo-37803.chEizy.rst new file mode 100644 index 00000000000000..5c0eedb9370963 --- /dev/null +++ b/Misc/NEWS.d/next/Tools-Demos/2019-09-12-16-15-55.bpo-37803.chEizy.rst @@ -0,0 +1 @@ +pdb's ``--help`` and ``--version`` long options now work.