Deprecate the timing module for removal in Python 3.0.

This commit is contained in:
Brett Cannon 2008-05-12 03:47:47 +00:00
parent ac861b5a17
commit bb141bb1f4
3 changed files with 8 additions and 0 deletions

View File

@ -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

View File

@ -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.

View File

@ -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);
} }