]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-90085: Remove vestigial -t and -c timeit options (#94941)
authorShantanu <12621235+hauntsaninja@users.noreply.github.com>
Fri, 7 Oct 2022 22:38:20 +0000 (15:38 -0700)
committerGitHub <noreply@github.com>
Fri, 7 Oct 2022 22:38:20 +0000 (15:38 -0700)
See bpo-28240. The functionality was removed in 3d7feb9ac2.
The options had been deprecated since Python 3.3

Lib/timeit.py
Misc/NEWS.d/next/Library/2022-07-17-22-31-32.gh-issue-90085.c4FWcS.rst [new file with mode: 0644]

index 9dfd454936e6b8c790297f2020d1295fc447dde6..0cf8db67723a4972433455fca14b7bae4ad2324b 100755 (executable)
@@ -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 (file)
index 0000000..37952ad
--- /dev/null
@@ -0,0 +1,3 @@
+Remove ``-c/--clock`` and ``-t/--time`` CLI options of :mod:`timeit`.\r
+The options had been deprecated since Python 3.3 and the functionality\r
+was removed in Python 3.7. Patch by Shantanu Jain.