Skip to content

Commit bb141bb

Browse files
committed
Deprecate the timing module for removal in Python 3.0.
1 parent ac861b5 commit bb141bb

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

Doc/library/undoc.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@ extensions.
213213
214214
:mod:`timing`
215215
--- Measure time intervals to high resolution (use :func:`time.clock` instead).
216+
217+
.. warning:: The :mod:`timing` module has been removed in Python 3.0.
216218

217219

218220
SGI-specific Extension modules

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Extension Modules
2626
Library
2727
-------
2828

29+
- The timing module has been deprecated for removal in Python 3.0.
30+
2931
- The sv module has been deprecated for removal in Python 3.0.
3032

3133
- The multifile module has been deprecated as per PEP 4.

Modules/timingmodule.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,9 @@ static PyMethodDef timing_methods[] = {
5454

5555
PyMODINIT_FUNC inittiming(void)
5656
{
57+
if (PyErr_WarnPy3k("the timing module has been removed in "
58+
"Python 3.0; use time.clock() instead", 2) < 0)
59+
return;
60+
5761
(void)Py_InitModule("timing", timing_methods);
5862
}

0 commit comments

Comments
 (0)