-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
bpo-31803: Remove time.clock() #4018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* Remove time.clock() function * time.get_clock_info() doesn't accept 'clock' anymore * Document the removal in What's New in Python 3.7 * Replace time.clock() with time.perf_counter() in the profile module, in turtledemo, and in ctypes tests.
This option wasn't implemented, documented, nor tested.
|
|
||
| .. versionadded:: 3.3 | ||
| .. versionchanged:: 3.7 | ||
| ``'clock'`` is no more accepted since ``time.clock()`` was removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/no more/no longer
| ---- | ||
|
|
||
| The ``time.clock()`` function has been removed, it was deprecated since Python | ||
| 3.3. The function was not portable: on Windows it mesured wall-clock, whereas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps replace:
it was deprecated since Python 3.3.
with:
as it has been deprecated since Python 3.3.
| ---- | ||
|
|
||
| The ``time.clock()`` function has been removed, it was deprecated since Python | ||
| 3.3. The function was not portable: on Windows it mesured wall-clock, whereas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/mesured/measured
| The ``time.clock()`` function has been removed, it was deprecated since Python | ||
| 3.3. The function was not portable: on Windows it mesured wall-clock, whereas | ||
| it measured CPU time on Unix. Python provides better defined clocks with better | ||
| resolution since Python 3.3: use :func:`time.perf_counter` or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps change:
Python provides better defined clocks with better resolution since Python 3.3
to:
Python has provided other clocks with better resolution since Python 3.3
|
I merged my PR #4020 which emits a deprecation warning. Let's wait for Pyhon 3.8 to remove time.clock(). I abandon this PR. |
|
Thanks for the review @dianaclarke anyway ;-) |
module, in turtledemo, and in ctypes tests.
https://bugs.python.org/issue31803