]> granicus.if.org Git - python/commit
time.clock() now emits a DeprecationWarning (GH-4020)
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 17 Oct 2017 21:46:45 +0000 (14:46 -0700)
committerGitHub <noreply@github.com>
Tue, 17 Oct 2017 21:46:45 +0000 (14:46 -0700)
commit884d13a55fc328e2e1e3948a82b361b30804b818
tree8b68f04b9261c26d4f2f5ed7a7beaa1d31c236c0
parentde86073a761cd3539aaca6f886a1f55effc0d9da
time.clock() now emits a DeprecationWarning (GH-4020)

bpo-31803: time.clock() and time.get_clock_info('clock') now emit a
DeprecationWarning warning.

Replace time.clock() with time.perf_counter() in tests and demos.

Remove also hasattr(time, 'monotonic') in test_time since time.monotonic()
is now always available since Python 3.5.
14 files changed:
Doc/library/profile.rst
Doc/library/time.rst
Lib/ctypes/test/test_numbers.py
Lib/ctypes/test/test_strings.py
Lib/profile.py
Lib/test/test_time.py
Lib/turtledemo/bytedesign.py
Lib/turtledemo/forest.py
Lib/turtledemo/fractalcurves.py
Lib/turtledemo/penrose.py
Lib/turtledemo/tree.py
Lib/turtledemo/wikipedia.py
Misc/NEWS.d/next/Library/2017-10-17-22-55-13.bpo-31803.YLL1gJ.rst [new file with mode: 0644]
Modules/timemodule.c