[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/app/rdb/ Convert use of zapi to zope.component.

Brian Sutherland jinty at web.de
Mon Apr 10 19:37:44 EDT 2006


Log message for revision 66825:
  Convert use of zapi to zope.component.

Changed:
  U   Zope3/branches/jim-adapter/src/zope/app/rdb/gadflymeta.py
  U   Zope3/branches/jim-adapter/src/zope/app/rdb/metaconfigure.py
  U   Zope3/branches/jim-adapter/src/zope/app/rdb/tests/test_directives.py

-=-
Modified: Zope3/branches/jim-adapter/src/zope/app/rdb/gadflymeta.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/rdb/gadflymeta.py	2006-04-10 23:25:54 UTC (rev 66824)
+++ Zope3/branches/jim-adapter/src/zope/app/rdb/gadflymeta.py	2006-04-10 23:37:43 UTC (rev 66825)
@@ -18,7 +18,6 @@
 from zope.configuration.fields import Path
 from zope.interface import Interface
 
-from zope.app import zapi
 from zope.app.rdb.gadflyda import setGadflyRoot 
 
 class IGadflyRoot(Interface):

Modified: Zope3/branches/jim-adapter/src/zope/app/rdb/metaconfigure.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/rdb/metaconfigure.py	2006-04-10 23:25:54 UTC (rev 66824)
+++ Zope3/branches/jim-adapter/src/zope/app/rdb/metaconfigure.py	2006-04-10 23:37:43 UTC (rev 66825)
@@ -15,7 +15,7 @@
 
 $Id$
 """
-from zope.app import zapi
+import zope.component
 from zope.app.rdb.interfaces import IZopeDatabaseAdapter
 
 
@@ -31,7 +31,7 @@
     
     Uses the global site manager for registering the connection
     """
-    gsm = zapi.getGlobalSiteManager()
+    gsm = zope.component.getGlobalSiteManager()
     gsm.registerUtility(connection, IZopeDatabaseAdapter, name)
 
 

Modified: Zope3/branches/jim-adapter/src/zope/app/rdb/tests/test_directives.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/rdb/tests/test_directives.py	2006-04-10 23:25:54 UTC (rev 66824)
+++ Zope3/branches/jim-adapter/src/zope/app/rdb/tests/test_directives.py	2006-04-10 23:37:43 UTC (rev 66825)
@@ -16,7 +16,6 @@
 $Id$
 """
 import unittest
-from zope.app import zapi
 from zope.app.testing.placelesssetup import PlacelessSetup
 from zope.component import getUtilitiesFor, queryUtility
 from zope.configuration import xmlconfig
@@ -29,7 +28,7 @@
 
     def test_provideConnection(self):
 
-        conns = list(zapi.getUtilitiesFor(IZopeDatabaseAdapter))
+        conns = list(getUtilitiesFor(IZopeDatabaseAdapter))
         self.assertEqual(conns, [])
         connectionstub = queryUtility(IZopeDatabaseAdapter, 'stub')
         self.assertEqual(connectionstub, None)
@@ -38,7 +37,7 @@
         connectionstub = queryUtility(IZopeDatabaseAdapter, 'stub')
         connection = connectionstub()
         self.assertEqual(connectionstub.__class__, DAStub)
-        conns = zapi.getUtilitiesFor(IZopeDatabaseAdapter)
+        conns = getUtilitiesFor(IZopeDatabaseAdapter)
            
         self.assertEqual([c[0] for c in conns], ["stub"])
         self.assertEqual(connection.__class__, ZopeConnection)



More information about the Zope3-Checkins mailing list