[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication - ZopePublication.py:1.13.4.1
Jim Fulton
jim@zope.com
Thu, 19 Dec 2002 12:25:16 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication
In directory cvs.zope.org:/tmp/cvs-serv1013
Modified Files:
Tag: AdapterAndView-branch
ZopePublication.py
Log Message:
Got rid of RequestContainer decoy.
Added mix-in class to aid debugging to allow setting a breakpoint at
the call to an applicatiuon object.
=== Zope3/lib/python/Zope/App/ZopePublication/ZopePublication.py 1.13 => 1.13.4.1 ===
--- Zope3/lib/python/Zope/App/ZopePublication/ZopePublication.py:1.13 Fri Dec 6 08:12:09 2002
+++ Zope3/lib/python/Zope/App/ZopePublication/ZopePublication.py Thu Dec 19 12:25:16 2002
@@ -46,13 +46,6 @@
# XXX Should this be imported here?
from Transaction import get_transaction
-class RequestContainer:
- # TODO: add security assertion declaring access to REQUEST
-
- def __init__(self, request):
- self.REQUEST = request
-
-
class Cleanup:
def __init__(self, f):
self.__del__ = f
@@ -243,3 +236,19 @@
def _parameterSetskin(self, pname, pval, request):
request.setViewSkin(pval)
+class DebugPublication(object):
+
+ class call_wrapper:
+
+ def __init__(self, ob):
+ self.__ob = ob
+
+ def __getattr__(self, name):
+ return getattr(self.__ob, name)
+
+ def __call__(self, *args, **kw):
+ self.__ob(*args, **kw)
+
+ def callObject(self, request, ob):
+ return mapply(self.call_wrapper(ob),
+ request.getPositionalArguments(), request)