[Zope3-checkins] CVS: Zope3/src/zope/app/services - auth.py:1.27 presentation.py:1.7 registration.py:1.25 view.py:1.38

Jim Fulton jim at zope.com
Sat Mar 6 12:49:30 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/services
In directory cvs.zope.org:/tmp/cvs-serv21993/src/zope/app/services

Modified Files:
	auth.py presentation.py registration.py view.py 
Log Message:
Changed most calls to queryAdapter to use interface calls instead.


=== Zope3/src/zope/app/services/auth.py 1.26 => 1.27 ===
--- Zope3/src/zope/app/services/auth.py:1.26	Sat Mar  6 11:50:30 2004
+++ Zope3/src/zope/app/services/auth.py	Sat Mar  6 12:48:53 2004
@@ -20,7 +20,6 @@
 from BTrees.OOBTree import OOBTree
 
 from zope.exceptions import NotFoundError
-from zope.component import queryAdapter
 from zope.app.services.servicenames import Authentication
 
 from zope.app.container.interfaces import IContainer
@@ -68,7 +67,7 @@
         warnings.warn('The Simple Authentication Service is deprecated and '
                       'will be removed in a future revision of Zope 3',
                       DeprecationWarning)
-        a = queryAdapter(request, ILoginPassword, None)
+        a = ILoginPassword(request, None)
         if a is not None:
             login = a.getLogin()
             if login is not None:


=== Zope3/src/zope/app/services/presentation.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/services/presentation.py:1.6	Sat Mar  6 11:50:30 2004
+++ Zope3/src/zope/app/services/presentation.py	Sat Mar  6 12:48:53 2004
@@ -493,7 +493,7 @@
         objectpath = zapi.getPath(self)
         dependents.addDependent(objectpath)
         # Also update usage, if supported
-        adapter = zapi.queryAdapter(template, IRegistered)
+        adapter = IRegistered(template, None)
         if adapter is not None:
             adapter.addUsage(objectpath)
 
@@ -506,7 +506,7 @@
         objectpath = zapi.getPath(self)
         dependents.addDependent(objectpath)
         # Also update usage, if supported
-        adapter = zapi.queryAdapter(template, IRegistered)
+        adapter = IRegistered(template, None)
         if adapter is not None:
             adapter.removeUsage(zapi.getPath(self))
 


=== Zope3/src/zope/app/services/registration.py 1.24 => 1.25 ===
--- Zope3/src/zope/app/services/registration.py:1.24	Sat Mar  6 11:50:30 2004
+++ Zope3/src/zope/app/services/registration.py	Sat Mar  6 12:48:53 2004
@@ -434,7 +434,7 @@
         objectpath = zapi.getPath(self)
         dependents.addDependent(objectpath)
         # Also update usage, if supported
-        adapter = zapi.queryAdapter(component, interfaces.IRegistered)
+        adapter = interfaces.IRegistered(component, None)
         if adapter is not None:
             adapter.addUsage(objectpath)
 
@@ -446,7 +446,7 @@
         objectpath = zapi.getPath(self)
         dependents.removeDependent(objectpath)
         # Also update usage, if supported
-        adapter = zapi.queryAdapter(component, interfaces.IRegistered)
+        adapter = interfaces.IRegistered(component, None)
         if adapter is not None:
             adapter.removeUsage(zapi.getPath(self))
 


=== Zope3/src/zope/app/services/view.py 1.37 => 1.38 ===
--- Zope3/src/zope/app/services/view.py:1.37	Fri Feb 20 11:57:30 2004
+++ Zope3/src/zope/app/services/view.py	Sat Mar  6 12:48:53 2004
@@ -199,7 +199,7 @@
                 yield info["registration"]
 
         next = getNextService(self, Views)
-        next = zapi.queryAdapter(next, IInterfaceBasedRegistry)
+        next = IInterfaceBasedRegistry(next, None)
         if next is None:
             return
         for r in next.getRegistrationsForInterface(iface):




More information about the Zope3-Checkins mailing list