[Zope3-checkins] CVS: Zope3/src/zope/app/introspector - __init__.py:1.5 browser.py:1.3

Jim Fulton jim at zope.com
Sat Mar 6 11:50:58 EST 2004


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

Modified Files:
	__init__.py browser.py 
Log Message:
Converted most getAdapter calls to use interface calls instead.


=== Zope3/src/zope/app/introspector/__init__.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/introspector/__init__.py:1.4	Fri Mar  5 17:09:09 2004
+++ Zope3/src/zope/app/introspector/__init__.py	Sat Mar  6 11:50:26 2004
@@ -18,7 +18,7 @@
 from zope.interface import Interface
 from zope.app.introspector.interfaces import IIntrospector
 from zope.app.interfaces.services.module import IModuleService
-from zope.component import getService, getAdapter, getServiceDefinitions
+from zope.component import getService, getServiceDefinitions
 from zope.proxy import removeAllProxies
 from zope.interface import implements, implementedBy
 from zope.interface import directlyProvides, directlyProvidedBy, providedBy
@@ -53,7 +53,7 @@
             if (self.context == Interface and
                 name != 'Interface._Interface.Interface'):
                 servicemanager = getServiceManager(self.context)
-                adapter = getAdapter(servicemanager, IModuleService)
+                adapter = IModuleService(servicemanager)
                 self.currentclass = adapter.resolve(name)
                 self.context = self.currentclass
             else:


=== Zope3/src/zope/app/introspector/browser.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/introspector/browser.py:1.2	Fri Mar  5 10:54:39 2004
+++ Zope3/src/zope/app/introspector/browser.py	Sat Mar  6 11:50:26 2004
@@ -17,7 +17,6 @@
 """
 from zope.app.publisher.browser import BrowserView
 from zope.app.introspector.interfaces import IIntrospector
-from zope.component import getAdapter
 from zope.app import zapi
 from zope.component.exceptions import ComponentLookupError
 from zope.interface import directlyProvides, directlyProvidedBy
@@ -29,7 +28,7 @@
 class IntrospectorView(BrowserView):
 
     def getIntrospector(self):
-        introspector = getAdapter(self.context, IIntrospector)
+        introspector = IIntrospector(self.context)
         introspector.setRequest(self.request)
         return introspector
 




More information about the Zope3-Checkins mailing list