Commit bb141bb1 authored by Brett Cannon's avatar Brett Cannon

Deprecate the timing module for removal in Python 3.0.

parent ac861b5a
...@@ -213,6 +213,8 @@ extensions. ...@@ -213,6 +213,8 @@ extensions.
:mod:`timing` :mod:`timing`
--- Measure time intervals to high resolution (use :func:`time.clock` instead). --- Measure time intervals to high resolution (use :func:`time.clock` instead).
.. warning:: The :mod:`timing` module has been removed in Python 3.0.
SGI-specific Extension modules SGI-specific Extension modules
......
...@@ -26,6 +26,8 @@ Extension Modules ...@@ -26,6 +26,8 @@ Extension Modules
Library Library
------- -------
- The timing module has been deprecated for removal in Python 3.0.
- The sv module has been deprecated for removal in Python 3.0. - The sv module has been deprecated for removal in Python 3.0.
- The multifile module has been deprecated as per PEP 4. - The multifile module has been deprecated as per PEP 4.
......
...@@ -54,5 +54,9 @@ static PyMethodDef timing_methods[] = { ...@@ -54,5 +54,9 @@ static PyMethodDef timing_methods[] = {
PyMODINIT_FUNC inittiming(void) PyMODINIT_FUNC inittiming(void)
{ {
if (PyErr_WarnPy3k("the timing module has been removed in "
"Python 3.0; use time.clock() instead", 2) < 0)
return;
(void)Py_InitModule("timing", timing_methods); (void)Py_InitModule("timing", timing_methods);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment