- patch fron mod_python cvs resources (stolen from rawhide).
authorkloczek <kloczek@pld-linux.org>
Sun, 26 May 2002 17:07:50 +0000 (17:07 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache-mod_python-cleanup.patch -> 1.1

apache-mod_python-cleanup.patch [new file with mode: 0644]

diff --git a/apache-mod_python-cleanup.patch b/apache-mod_python-cleanup.patch
new file mode 100644 (file)
index 0000000..c591b23
--- /dev/null
@@ -0,0 +1,49 @@
+Index: mod_python/lib/python/mod_python/apache.py
+===================================================================
+RCS file: /home/devel/CVS/rhn/modules/mod_python/lib/python/mod_python/apache.py,v
+retrieving revision 1.4
+diff -u -r1.4 apache.py
+--- mod_python/lib/python/mod_python/apache.py 2 Aug 2001 22:52:50 -0000       1.4
++++ mod_python/lib/python/mod_python/apache.py 28 Feb 2002 02:57:53 -0000
+@@ -58,10 +58,6 @@
+ # variable stores the last PythonPath in raw (unevaled) form.
+ _path = None
+-# this is used in Request.__init__
+-def _cleanup_request(_req):
+-    _req._Request = None
+-
+ class Request:
+     """ This is a normal Python Class that can be subclassed.
+         However, most of its functionality comes from a built-in
+@@ -73,11 +69,6 @@
+         # look at __setattr__ if changing this line!
+         self._req = _req
+         
+-        # this will decrement the reference to the _req
+-        # object at cleanup time. If we don't do this, we
+-        # get a cirular reference and _req never gets destroyed.
+-        _req.register_cleanup(_cleanup_request, _req)
+-
+     def __getattr__(self, attr):
+         try:
+             return getattr(self._req, attr)
+@@ -129,6 +120,7 @@
+         # is there a Request object for this request?
+         if not _req._Request:
++            # warning, creating circular reference here
+             _req._Request = Request(_req)
+             
+         req = _req._Request
+@@ -239,6 +231,10 @@
+                                           htype=htype, hname=handler, debug=debug)
+             finally:
+                 exc_traceback = None
++
++        if htype == "PythonCleanupHandler":
++            # destroy the circular reference
++            _req._Request = req = None
+       return result
This page took 0.061605 seconds and 4 git commands to generate.