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

@ -54,5 +54,9 @@ static PyMethodDef timing_methods[] = {
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);
}