[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/app/component/interface.py make independent of zope.app (prepare for moving).

Philipp von Weitershausen philikon at philikon.de
Fri Apr 7 12:44:43 EDT 2006


Log message for revision 66652:
  make independent of zope.app (prepare for moving).
  

Changed:
  U   Zope3/branches/jim-adapter/src/zope/app/component/interface.py

-=-
Modified: Zope3/branches/jim-adapter/src/zope/app/component/interface.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/interface.py	2006-04-07 16:09:02 UTC (rev 66651)
+++ Zope3/branches/jim-adapter/src/zope/app/component/interface.py	2006-04-07 16:44:42 UTC (rev 66652)
@@ -16,18 +16,20 @@
 $Id$
 """
 __docformat__ = 'restructuredtext'
+
 from types import ClassType
+
+import zope.component
 from zope.component.interfaces import ComponentLookupError
 from zope.interface import directlyProvides, directlyProvidedBy
 from zope.interface.interfaces import IInterface
-from zope.app import zapi
 
 def provideInterface(id, interface, iface_type=None, info=''):
     """register Interface with global site manager as utility
 
     >>> from zope.app.testing import placelesssetup
     >>> placelesssetup.setUp()
-    >>> gsm = zapi.getGlobalSiteManager()
+    >>> gsm = zope.component.getGlobalSiteManager()
 
     >>> from zope.interface import Interface
     >>> from zope.interface.interfaces import IInterface
@@ -98,7 +100,7 @@
     else:
         iface_type = IInterface
         
-    gsm = zapi.getGlobalSiteManager()
+    gsm = zope.component.getGlobalSiteManager()
     gsm.registerUtility(interface, iface_type, id, info)
 
 
@@ -163,7 +165,7 @@
     'I3'
     >>> placelesssetup.tearDown()
     """
-    return zapi.queryUtility(IInterface, id, default)
+    return zope.component.queryUtility(IInterface, id, default)
 
 
 def searchInterface(context, search_string=None, base=None):
@@ -230,7 +232,7 @@
 
 
 def searchInterfaceUtilities(context, search_string=None, base=None):
-    gsm = zapi.getGlobalSiteManager()
+    gsm = zope.component.getGlobalSiteManager()
     iface_utilities = gsm.getUtilitiesFor(IInterface)
 
     if search_string:



More information about the Zope3-Checkins mailing list