This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: time.clock() marked for removal in 3.8 – still there.
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: gregory.p.smith, mbussonn, vstinner, xtreak
Priority: normal Keywords: patch

Created on 2019-05-12 21:21 by mbussonn, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 13270 merged mbussonn, 2019-05-12 21:50
PR 13286 merged mbussonn, 2019-05-13 15:30
PR 13287 merged mbussonn, 2019-05-13 15:37
Messages (11)
msg342267 - (view) Author: Matthias Bussonnier (mbussonn) * Date: 2019-05-12 21:21
Deprecation message in `timemodule.c` says:

> "time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead"

Should be bumped to 3.9 – or time.clock should be removed.

Deprecation was added by Victor Stinner.
msg342268 - (view) Author: Matthias Bussonnier (mbussonn) * Date: 2019-05-12 21:22
Vstiner, added you as you added the deprecation notice. I'm happy to take care of the removal and/or update the deprecation warning to 3.9.
msg342277 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2019-05-13 01:34
New changeset e2500610c62673f42371b54fb0e4de83e4b33146 by Gregory P. Smith (Matthias Bussonnier) in branch 'master':
bpo-36895: remove time.clock() as per removal notice. (GH-13270)
https://github.com/python/cpython/commit/e2500610c62673f42371b54fb0e4de83e4b33146
msg342278 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2019-05-13 01:36
I saw the PR before the bug comment.  merged.  if we find a _good_ reason to delay this removal a cycle during the 3.8 betas we can bring it back.

thanks for staying on top of the removal plan!
msg342282 - (view) Author: Matthias Bussonnier (mbussonn) * Date: 2019-05-13 03:16
> If we find a _good_ reason to delay this removal a cycle during the 3.8 betas we can bring it back.
> thanks for staying on top of the removal plan!

Thanks to you for the quick integration; I'm happy if we need to bring it back, but at least having it removed during betas/alphas will nudge people toward updating their code.
msg342294 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-05-13 09:20
I would prefer to remove time.clock() documentation if the function is removed.

Would you mind to update Python 3.7 documentation to mention that the function is removed from Python 3.8?
https://docs.python.org/3.7/library/time.html#time.clock

In short, use ".. deprecated-removed:: 3.3 3.8 " in Python 3.7 doc.
msg342298 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2019-05-13 09:32
Should this section also be updated about time.clock removal?

https://docs.python.org/3.8/whatsnew/3.8.html#api-and-feature-removals
msg342345 - (view) Author: Matthias Bussonnier (mbussonn) * Date: 2019-05-13 15:39
Done:
 -  1 PR against master to remove the documentation and update api-and-feature-removals 
 - and one against 3.7 to add the deprecated-removed.
msg342354 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-05-13 16:08
New changeset 24482bd0ae203116fd7e41ec3219fb2857fb3ac7 by Victor Stinner (Matthias Bussonnier) in branch '3.7':
[3.7] bpo-36895: document time.clock() has been removed in 3.8 (GH-13287)
https://github.com/python/cpython/commit/24482bd0ae203116fd7e41ec3219fb2857fb3ac7
msg342375 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-05-13 19:23
New changeset b6a09ae287e253e4146a5a224b75d4dbfd38cb63 by Victor Stinner (Matthias Bussonnier) in branch 'master':
bpo-36895: Undocument removed time.clock (GH-13286)
https://github.com/python/cpython/commit/b6a09ae287e253e4146a5a224b75d4dbfd38cb63
msg343707 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-05-27 23:41
> time.clock() marked for removal in 3.8 – still there.

Nope, it's now gone :-) I close the issue.
History
Date User Action Args
2022-04-11 14:59:15adminsetgithub: 81076
2019-05-27 23:41:17vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg343707

stage: patch review -> resolved
2019-05-13 19:23:20vstinnersetmessages: + msg342375
2019-05-13 16:08:52vstinnersetmessages: + msg342354
2019-05-13 15:39:58mbussonnsetmessages: + msg342345
2019-05-13 15:37:22mbussonnsetpull_requests: + pull_request13195
2019-05-13 15:30:19mbussonnsetstage: commit review -> patch review
pull_requests: + pull_request13193
2019-05-13 09:32:33xtreaksetnosy: + xtreak
messages: + msg342298
2019-05-13 09:20:43vstinnersetstatus: closed -> open
resolution: fixed -> (no value)
messages: + msg342294
2019-05-13 03:16:00mbussonnsetmessages: + msg342282
2019-05-13 01:36:24gregory.p.smithsetstatus: open -> closed
resolution: fixed
messages: + msg342278

stage: patch review -> commit review
2019-05-13 01:34:56gregory.p.smithsetnosy: + gregory.p.smith
messages: + msg342277
2019-05-12 21:50:28mbussonnsetkeywords: + patch
stage: patch review
pull_requests: + pull_request13176
2019-05-12 21:22:39mbussonnsetnosy: + vstinner
messages: + msg342268
2019-05-12 21:21:34mbussonncreate