[Python-checkins] r61732 - python/trunk/Lib/hotshot/__init__.py
alexandre.vassalotti
python-checkins at python.org
Sat Mar 22 05:08:45 CET 2008
Author: alexandre.vassalotti
Date: Sat Mar 22 05:08:44 2008
New Revision: 61732
Modified:
python/trunk/Lib/hotshot/__init__.py
Log:
Added warning for the removal of 'hotshot' in Py3k.
Modified: python/trunk/Lib/hotshot/__init__.py
==============================================================================
--- python/trunk/Lib/hotshot/__init__.py (original)
+++ python/trunk/Lib/hotshot/__init__.py Sat Mar 22 05:08:44 2008
@@ -1,9 +1,11 @@
"""High-perfomance logging profiler, mostly written in C."""
import _hotshot
-
from _hotshot import ProfilerError
+from warnings import warnpy3k as _warnpy3k
+_warnpy3k("The 'hotshot' module is not supported in 3.x, "
+ "use the 'profile' module instead.", stacklevel=2)
class Profile:
def __init__(self, logfn, lineevents=0, linetimings=1):
More information about the Python-checkins
mailing list