[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/ Get rid of imports of zope.component.site. Registration objects now live in

Philipp von Weitershausen philikon at philikon.de
Wed Mar 1 00:56:50 EST 2006


Log message for revision 65660:
  Get rid of imports of zope.component.site. Registration objects now live in
  zope.component.components, global stuff in zope.component.globalregistry.
  

Changed:
  U   Zope3/branches/jim-adapter/src/zope/app/apidoc/component.py
  U   Zope3/branches/jim-adapter/src/zope/app/apidoc/component.txt
  U   Zope3/branches/jim-adapter/src/zope/app/apidoc/presentation.py
  U   Zope3/branches/jim-adapter/src/zope/app/apidoc/presentation.txt
  U   Zope3/branches/jim-adapter/src/zope/app/apidoc/utilitymodule/utilitymodule.py
  U   Zope3/branches/jim-adapter/src/zope/app/component/__init__.py
  U   Zope3/branches/jim-adapter/src/zope/app/component/site.py
  U   Zope3/branches/jim-adapter/src/zope/app/component/tests/test_directives.py
  U   Zope3/branches/jim-adapter/src/zope/component/__init__.py
  U   Zope3/branches/jim-adapter/src/zope/component/bbb/adapter.py
  U   Zope3/branches/jim-adapter/src/zope/component/bbb/service.py
  U   Zope3/branches/jim-adapter/src/zope/component/bbb/utility.py
  U   Zope3/branches/jim-adapter/src/zope/component/tests.py

-=-
Modified: Zope3/branches/jim-adapter/src/zope/app/apidoc/component.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/apidoc/component.py	2006-03-01 05:31:16 UTC (rev 65659)
+++ Zope3/branches/jim-adapter/src/zope/app/apidoc/component.py	2006-03-01 05:56:50 UTC (rev 65660)
@@ -25,7 +25,7 @@
     HandlerRegistration,
     )
     
-from zope.component.site import UtilityRegistration
+from zope.component.components import UtilityRegistration
 from zope.interface import Interface
 from zope.interface.interface import InterfaceClass
 import zope.interface.declarations

Modified: Zope3/branches/jim-adapter/src/zope/app/apidoc/component.txt
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/apidoc/component.txt	2006-03-01 05:31:16 UTC (rev 65659)
+++ Zope3/branches/jim-adapter/src/zope/app/apidoc/component.txt	2006-03-01 05:56:50 UTC (rev 65660)
@@ -304,7 +304,7 @@
   >>> class MyResult(object):
   ...     implements(IResult)
 
-  >>> from zope.component.site import AdapterRegistration
+  >>> from zope.component.components import AdapterRegistration
   >>> reg = AdapterRegistration((IFoo, IBar), IResult, 'FooToResult',
   ...                            MyResult, 'doc info')
 

Modified: Zope3/branches/jim-adapter/src/zope/app/apidoc/presentation.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/apidoc/presentation.py	2006-03-01 05:31:16 UTC (rev 65659)
+++ Zope3/branches/jim-adapter/src/zope/app/apidoc/presentation.py	2006-03-01 05:56:50 UTC (rev 65660)
@@ -16,7 +16,7 @@
 $Id$
 """
 from types import ClassType, FunctionType
-from zope.component.site import AdapterRegistration
+from zope.component.components import AdapterRegistration
 from zope.interface import Interface
 
 from zope.app import zapi

Modified: Zope3/branches/jim-adapter/src/zope/app/apidoc/presentation.txt
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/apidoc/presentation.txt	2006-03-01 05:31:16 UTC (rev 65659)
+++ Zope3/branches/jim-adapter/src/zope/app/apidoc/presentation.txt	2006-03-01 05:56:50 UTC (rev 65660)
@@ -384,7 +384,7 @@
 
 Let's first create a registration:
 
-  >>> from zope.component.site import AdapterRegistration
+  >>> from zope.component.components import AdapterRegistration
   >>> reg = AdapterRegistration((IFile, Interface, IHTTPRequest),
   ...                           Interface, 'view.html', Factory, 'reg info')
 

Modified: Zope3/branches/jim-adapter/src/zope/app/apidoc/utilitymodule/utilitymodule.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/apidoc/utilitymodule/utilitymodule.py	2006-03-01 05:31:16 UTC (rev 65659)
+++ Zope3/branches/jim-adapter/src/zope/app/apidoc/utilitymodule/utilitymodule.py	2006-03-01 05:56:50 UTC (rev 65660)
@@ -19,7 +19,7 @@
 
 import base64, binascii
 
-from zope.component.site import UtilityRegistration
+from zope.component.components import UtilityRegistration
 from zope.interface import implements
 
 from zope.app import zapi

Modified: Zope3/branches/jim-adapter/src/zope/app/component/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/__init__.py	2006-03-01 05:31:16 UTC (rev 65659)
+++ Zope3/branches/jim-adapter/src/zope/app/component/__init__.py	2006-03-01 05:56:50 UTC (rev 65660)
@@ -42,7 +42,7 @@
     `default` is returned.
     """
     sm = zapi.getSiteManager(context)
-    if zope.component.site.IGlobalSiteManager.providedBy(sm):
+    if zope.component.globalregistry.IGlobalSiteManager.providedBy(sm):
         return default
     if sm.next is None:
         return zapi.getGlobalSiteManager()

Modified: Zope3/branches/jim-adapter/src/zope/app/component/site.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/site.py	2006-03-01 05:31:16 UTC (rev 65659)
+++ Zope3/branches/jim-adapter/src/zope/app/component/site.py	2006-03-01 05:56:50 UTC (rev 65660)
@@ -27,7 +27,7 @@
 
 import zope.event
 import zope.interface
-import zope.component
+import zope.component.components
 from zope.component.exceptions import ComponentLookupError
 from zope.security.proxy import removeSecurityProxy
 
@@ -181,7 +181,7 @@
 
 class LocalSiteManager(BTreeContainer,
                        bbb.site.BBBSiteManager,
-                       zope.component.site.SiteManager):
+                       zope.component.components.Components):
     """Local Site Manager implementation"""
     zope.interface.implements(
         interfaces.ILocalSiteManager,

Modified: Zope3/branches/jim-adapter/src/zope/app/component/tests/test_directives.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/tests/test_directives.py	2006-03-01 05:31:16 UTC (rev 65659)
+++ Zope3/branches/jim-adapter/src/zope/app/component/tests/test_directives.py	2006-03-01 05:56:50 UTC (rev 65660)
@@ -24,7 +24,7 @@
 from zope.testing.doctestunit import DocTestSuite
 from zope.component import createObject
 from zope.component.interfaces import IDefaultViewName
-from zope.component.site import SubscriptionRegistration
+from zope.component.components import SubscriptionRegistration
 
 from zope.configuration.xmlconfig import xmlconfig, XMLConfig
 from zope.configuration.exceptions import ConfigurationError

Modified: Zope3/branches/jim-adapter/src/zope/component/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/component/__init__.py	2006-03-01 05:31:16 UTC (rev 65659)
+++ Zope3/branches/jim-adapter/src/zope/component/__init__.py	2006-03-01 05:56:50 UTC (rev 65660)
@@ -26,7 +26,7 @@
 from zope.component.interfaces import IFactory
 from zope.component.interfaces import ISiteManager
 from zope.component.interfaces import ComponentLookupError
-from zope.component.site import globalSiteManager
+from zope.component.globalregistry import base as globalSiteManager
 
 _class_types = type, ClassType
 

Modified: Zope3/branches/jim-adapter/src/zope/component/bbb/adapter.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/component/bbb/adapter.py	2006-03-01 05:31:16 UTC (rev 65659)
+++ Zope3/branches/jim-adapter/src/zope/component/bbb/adapter.py	2006-03-01 05:56:50 UTC (rev 65660)
@@ -24,7 +24,7 @@
 from zope.component.exceptions import ComponentLookupError
 from zope.component.interfaces import IAdapterService, IRegistry
 from zope.component.bbb.service import GlobalService
-from zope.component.site import AdapterRegistration, SubscriptionRegistration
+from zope.component.components import AdapterRegistration, SubscriptionRegistration
 from zope.interface import implements, providedBy, Interface, implementedBy
 from zope.interface.interfaces import IInterface
 
@@ -65,8 +65,8 @@
 
     def __init__(self, sitemanager=None):
         if sitemanager is None:
-            from zope.component.site import GlobalSiteManager
-            sitemanager = GlobalSiteManager()
+            from zope.component.globalregistry import BaseGlobalComponents
+            sitemanager = BaseGlobalComponents()
         self.sm = sitemanager
 
     def __getattr__(self, name):

Modified: Zope3/branches/jim-adapter/src/zope/component/bbb/service.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/component/bbb/service.py	2006-03-01 05:31:16 UTC (rev 65659)
+++ Zope3/branches/jim-adapter/src/zope/component/bbb/service.py	2006-03-01 05:56:50 UTC (rev 65660)
@@ -72,8 +72,8 @@
                 "manager, which is probably the object you want.",
                 DeprecationWarning, 2)
         if sitemanager is None:
-            from zope.component.site import GlobalSiteManager
-            sitemanager = GlobalSiteManager()
+            from zope.component.globalregistry import BaseGlobalComponents
+            sitemanager = BaseGlobalComponents()
         self.sm = sitemanager
         self.__name__ = name
         self.__module__ = module
@@ -166,7 +166,5 @@
 
 def defineService(name, interface, sitemanager=None):
     if sitemanager is None:
-        from zope.component.site import globalSiteManager
-        sitemanager = globalSiteManager
-    __getSM(sitemanager).defineService(name, interface)
-
+        from zope.component.globalregistry import base
+    __getSM(base).defineService(name, interface)

Modified: Zope3/branches/jim-adapter/src/zope/component/bbb/utility.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/component/bbb/utility.py	2006-03-01 05:31:16 UTC (rev 65659)
+++ Zope3/branches/jim-adapter/src/zope/component/bbb/utility.py	2006-03-01 05:56:50 UTC (rev 65660)
@@ -18,7 +18,7 @@
 from zope.component.exceptions import Invalid, ComponentLookupError
 from zope.component.interfaces import IUtilityService, IRegistry
 from zope.component.service import GlobalService, IService, IServiceDefinition
-from zope.component.site import UtilityRegistration
+from zope.component.components import UtilityRegistration
 import zope.interface
 
 class IGlobalUtilityService(IUtilityService, IRegistry):

Modified: Zope3/branches/jim-adapter/src/zope/component/tests.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/component/tests.py	2006-03-01 05:31:16 UTC (rev 65659)
+++ Zope3/branches/jim-adapter/src/zope/component/tests.py	2006-03-01 05:56:50 UTC (rev 65660)
@@ -795,7 +795,6 @@
 
     return unittest.TestSuite((
         doctest.DocTestSuite(setUp=setUp, tearDown=tearDown),
-        doctest.DocTestSuite('zope.component.site'),
         doctest.DocFileSuite('README.txt',
                              setUp=setUp, tearDown=tearDown),
         doctest.DocFileSuite('socketexample.txt',



More information about the Zope3-Checkins mailing list