[Zope3-checkins] CVS: Zope3/src/zope/app/publisher/browser - viewmeta.py:1.33

Jim Fulton jim at zope.com
Sun Sep 21 13:32:29 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/publisher/browser
In directory cvs.zope.org:/tmp/cvs-serv13558/src/zope/app/publisher/browser

Modified Files:
	viewmeta.py 
Log Message:
No-longer use context wrappers.


=== Zope3/src/zope/app/publisher/browser/viewmeta.py 1.32 => 1.33 ===
--- Zope3/src/zope/app/publisher/browser/viewmeta.py:1.32	Sun Aug 17 02:07:32 2003
+++ Zope3/src/zope/app/publisher/browser/viewmeta.py	Sun Sep 21 13:31:58 2003
@@ -33,7 +33,7 @@
 from zope.publisher.interfaces.browser import IBrowserPresentation
 from zope.publisher.interfaces.browser import IBrowserPublisher
 
-from zope.publisher.browser import BrowserView
+from zope.app.publisher.browser import BrowserView
 
 from zope.app.component.metaconfigure import handler
 
@@ -42,8 +42,6 @@
 
 from zope.app.security.permission import checkPermission
 
-from zope.context import ContextMethod
-
 from zope.app.publisher.browser.globalbrowsermenuservice \
      import menuItemDirective, globalBrowserMenuService
 
@@ -144,9 +142,7 @@
             if not hasattr(class_, 'browserDefault'):
                 cdict = {
                     'browserDefault':
-                    ContextMethod(lambda self, request:
-                                  (getattr(self, attribute), ())
-                                  )
+                    lambda self, request: (getattr(self, attribute), ())
                     }
             else:
                 cdict = {}
@@ -319,17 +315,17 @@
 
                 raise NotFoundError(self, name, request)
 
-        cdict['publishTraverse'] = ContextMethod(publishTraverse)
+        cdict['publishTraverse'] = publishTraverse
 
         if not hasattr(class_, 'browserDefault'):
             if self.default or self.pages:
                 default = self.default or self.pages[0][0]
-                cdict['browserDefault'] = ContextMethod(
+                cdict['browserDefault'] = (
                     lambda self, request, default=default:
                     (self, (default, ))
                     )
             elif providesCallable(class_):
-                cdict['browserDefault'] = ContextMethod(
+                cdict['browserDefault'] = (
                     lambda self, request: (self, ())
                     )
 
@@ -456,7 +452,6 @@
 
     def publishTraverse(self, request, name):
         raise NotFoundError(self, name, request)
-    publishTraverse = ContextMethod(publishTraverse)
 
     def __call__(self, *a, **k):
         # If a class doesn't provide it's own call, then get the attribute
@@ -468,7 +463,6 @@
 
         meth = getattr(self, attr)
         return meth(*a, **k)
-    __call__ = ContextMethod(__call__)
 
 def providesCallable(class_):
     if hasattr(class_, '__call__'):




More information about the Zope3-Checkins mailing list