mirror of https://github.com/python/cpython
Deprecate the timing module for removal in Python 3.0.
This commit is contained in:
parent
ac861b5a17
commit
bb141bb1f4
|
@ -214,6 +214,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
|
||||||
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[] = {
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue