From cb4615fd43e678fe44e9aeb6a486475a05b492e7 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Fri, 7 Oct 2022 15:38:20 -0700 Subject: gh-90085: Remove vestigial -t and -c timeit options (#94941) See bpo-28240. The functionality was removed in 3d7feb9ac2. The options had been deprecated since Python 3.3 --- Lib/timeit.py | 5 ++--- .../next/Library/2022-07-17-22-31-32.gh-issue-90085.c4FWcS.rst | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2022-07-17-22-31-32.gh-issue-90085.c4FWcS.rst diff --git a/Lib/timeit.py b/Lib/timeit.py index 9dfd454..0cf8db6 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") 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 0000000..37952ad --- /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. -- cgit v0.12