[Repoze-checkins] r1136 - repoze.debug/trunk

Chris McDonough chrism at agendaless.com
Thu Jun 26 11:20:59 EDT 2008


Author: Chris McDonough <chrism at agendaless.com>
Date: Thu Jun 26 11:20:58 2008
New Revision: 1136

Log:
Add canary middleware.


Modified:
   repoze.debug/trunk/CHANGES.txt
   repoze.debug/trunk/README.txt
   repoze.debug/trunk/setup.py

Modified: repoze.debug/trunk/CHANGES.txt
==============================================================================
--- repoze.debug/trunk/CHANGES.txt	(original)
+++ repoze.debug/trunk/CHANGES.txt	Thu Jun 26 11:20:58 2008
@@ -1,5 +1,11 @@
 Next release
 
+  - Add 'canary' middleware for detecting environment dictionary
+    leaks.  Add to your Paste config via 'egg:repoze.debug#canary'; it
+    takes no arguments.  If refcounts to repoze.debug.canary.Canary
+    grow without bound, you know you are leaking WSGI environment
+    dictionaries.
+
   - Add source url to response logging.
 
 0.2 (2008/06/14)

Modified: repoze.debug/trunk/README.txt
==============================================================================
--- repoze.debug/trunk/README.txt	(original)
+++ repoze.debug/trunk/README.txt	Thu Jun 26 11:20:58 2008
@@ -2,9 +2,6 @@
 ===================
 
 Middleware which can help with in-production forensic debugging.
-Currently the only middleware in this package is the responselogger
-middleware, which logs requests and responses to a file for later
-perusal.
 
 Installation
 ------------
@@ -13,6 +10,11 @@
 
  $ easy_install repoze.debug
 
+responselogger middleware
+=========================
+
+The responselogger middleware logs requests and responses to a file
+for later perusal.
 
 Configuration via Python
 ------------------------
@@ -113,6 +115,39 @@
   1?9p?:'~?? ?0a???q?J?(I?|;@@???????@?????!?,H? ?H?`?2t???K.LH?`D?
   --- end RESPONSE 860724193 ---
 
+canary middleware
+=================
+
+The 'canary' middleware is middleware that helps you figure out if you
+are leaking WSGI environment dictionary objects.
+
+Configuration via Python
+------------------------
+
+Wire up the middleware in your application::
+
+ from repoze.debug.canary import CanaryMiddleware
+ middleware = CanaryMiddleware(app)
+
+Configuration via Paste
+-----------------------
+
+Wire the canary middleware up into your pipeline::
+
+ [pipeline:main]
+ pipeline = egg:Paste#cgitb
+            egg:repoze.debug#canary
+            myapp
+
+
+Usage
+-----
+
+If refcounts to repoze.debug.canary.Canary grow without bound, you
+know you are leaking WSGI environment dictionaries.  Use e.g. Dozer to
+find reference leaks.
+
+
 Reporting Bugs / Development Versions
 -------------------------------------
 

Modified: repoze.debug/trunk/setup.py
==============================================================================
--- repoze.debug/trunk/setup.py	(original)
+++ repoze.debug/trunk/setup.py	Thu Jun 26 11:20:58 2008
@@ -12,7 +12,7 @@
 #
 ##############################################################################
 
-__version__ = '0.2'
+__version__ = '0.3'
 
 import os
 
@@ -57,6 +57,7 @@
       entry_points = """\
         [paste.filter_app_factory]
         responselogger = repoze.debug.responselogger:make_middleware
+        canary = repoze.debug.canary:make_middleware
       """
       )
 


More information about the Repoze-checkins mailing list