[Repoze-checkins] r820 - in repoze.profile/trunk: . repoze/profile

Tres Seaver tseaver at palladion.com
Mon Mar 17 21:22:23 EDT 2008


Author: Tres Seaver <tseaver at palladion.com>
Date: Mon Mar 17 21:22:22 2008
New Revision: 820

Log:
Incorporated a patch from Alec Flett <alecf at metaweb.com> to use 'cProfile',
if available, rather than pure Python 'profile'.


Modified:
   repoze.profile/trunk/CHANGES.txt
   repoze.profile/trunk/repoze/profile/profiler.py

Modified: repoze.profile/trunk/CHANGES.txt
==============================================================================
--- repoze.profile/trunk/CHANGES.txt	(original)
+++ repoze.profile/trunk/CHANGES.txt	Mon Mar 17 21:22:22 2008
@@ -1,21 +1,23 @@
 repoze.profile (unreleased)
 
-  Bump ez_setup.py version.
+  - Incorporated a patch from Alec Flett <alecf at metaweb.com> to uses
+    'cProfile', if available, rather than pure Python 'profile'.
+
+  - Bump ez_setup.py version.
 
 repoze.profile 0.3 (2008-02-20)
 
-  Compatibility with Python 2.5.
+  - Added compatibility with Python 2.5.
 
-  Depend explicitly on ElementTree 1.2.6 (meld needs it but meld isn't
-  a setuptools package).
+  - Made setup.py epend explicitly on ElementTree 1.2.6: meld needs it
+    but meld isn't a setuptools package.
 
 repoze.profile 0.2 (2008-02-20)
 
-  Add a browser UI.
+  - Added a browser UI.
 
-  Add a knob to control discard at shutdown.
+  - Added a knob to control discard at shutdown.
 
 repoze.profile 0.1 (2008-02-08)
 
-  Initial release.
-
+  - Initial release.

Modified: repoze.profile/trunk/repoze/profile/profiler.py
==============================================================================
--- repoze.profile/trunk/repoze/profile/profiler.py	(original)
+++ repoze.profile/trunk/repoze/profile/profiler.py	Mon Mar 17 21:22:22 2008
@@ -3,7 +3,11 @@
 o Insprired by the paste.debug.profile version, which profiles single requests.
 """
 import os
-import profile
+try:
+    import cProfile as profile
+except ImportError:
+    import profile
+    
 import pstats
 import sys
 import StringIO


More information about the Repoze-checkins mailing list