[Python-checkins] r63150 - in python/trunk: Doc/library/undoc.rst Misc/NEWS Modules/timingmodule.c

brett.cannon python-checkins at python.org
Mon May 12 05:47:47 CEST 2008


Author: brett.cannon
Date: Mon May 12 05:47:47 2008
New Revision: 63150

Log:
Deprecate the timing module for removal in Python 3.0.

Modified:
   python/trunk/Doc/library/undoc.rst
   python/trunk/Misc/NEWS
   python/trunk/Modules/timingmodule.c

Modified: python/trunk/Doc/library/undoc.rst
==============================================================================
--- python/trunk/Doc/library/undoc.rst	(original)
+++ python/trunk/Doc/library/undoc.rst	Mon May 12 05:47:47 2008
@@ -213,6 +213,8 @@
 
 :mod:`timing`
    --- 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

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Mon May 12 05:47:47 2008
@@ -26,6 +26,8 @@
 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 multifile module has been deprecated as per PEP 4.

Modified: python/trunk/Modules/timingmodule.c
==============================================================================
--- python/trunk/Modules/timingmodule.c	(original)
+++ python/trunk/Modules/timingmodule.c	Mon May 12 05:47:47 2008
@@ -54,5 +54,9 @@
 
 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);
 }


More information about the Python-checkins mailing list