[issue31803] Remove not portable time.clock(), replaced by time.perf_counter() and time.process_time()

Ben Hoyt report at bugs.python.org
Tue Oct 17 09:26:35 EDT 2017


Ben Hoyt <benhoyt at gmail.com> added the comment:

I don't think this is a good idea. I still use time.clock() out of habit (on Windows), and from the PR it's clear that the standard library and tests do too. I wouldn't be at all surprised to find others do as well.

I realize it's been deprecated since 3.3, but without a DeprecatingWarning, that's easy to miss. What about adding a DeprecatingWarning for 3.7 and deprecate it later, maybe in 3.9? (I know that's a long time, but time.clock() is an old function so we should be cautious!)

----------
nosy: +benhoyt

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31803>
_______________________________________


More information about the Python-bugs-list mailing list