From c2670f02c0edaa61189bc45d660c13c5369364e4 Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Sun, 17 Jul 2022 15:26:07 -0700 Subject: [PATCH 1/2] gh-90085: Remove vestigial -t and -c timeit options See bpo-28240. The functionality was removed in 3d7feb9ac2. The options had been deprecated since Python 3.3 --- Lib/timeit.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Lib/timeit.py b/Lib/timeit.py index 9dfd454936e6b8..0cf8db67723a49 100755 --- a/Lib/timeit.py +++ b/Lib/timeit.py @@ -259,10 +259,9 @@ def main(args=None, *, _wrap_timer=None): args = sys.argv[1:] import getopt try: - opts, args = getopt.getopt(args, "n:u:s:r:tcpvh", + opts, args = getopt.getopt(args, "n:u:s:r:pvh", ["number=", "setup=", "repeat=", - "time", "clock", "process", - "verbose", "unit=", "help"]) + "process", "verbose", "unit=", "help"]) except getopt.error as err: print(err) print("use -h/--help for command line help") From 7b365f7a32b88e837423fd61d925936c723b3ac7 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Sun, 17 Jul 2022 22:31:35 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Library/2022-07-17-22-31-32.gh-issue-90085.c4FWcS.rst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2022-07-17-22-31-32.gh-issue-90085.c4FWcS.rst diff --git a/Misc/NEWS.d/next/Library/2022-07-17-22-31-32.gh-issue-90085.c4FWcS.rst b/Misc/NEWS.d/next/Library/2022-07-17-22-31-32.gh-issue-90085.c4FWcS.rst new file mode 100644 index 00000000000000..37952adc8f1a92 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2022-07-17-22-31-32.gh-issue-90085.c4FWcS.rst @@ -0,0 +1,3 @@ +Remove ``-c/--clock`` and ``-t/--time`` CLI options of :mod:`timeit`. +The options had been deprecated since Python 3.3 and the functionality +was removed in Python 3.7. Patch by Shantanu Jain.