[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/ Removed zope.component.interfaces.ISiteManager references.

Jim Fulton jim at zope.com
Mon Mar 20 06:56:36 EST 2006


Log message for revision 66112:
  Removed zope.component.interfaces.ISiteManager references.
  

Changed:
  U   Zope3/branches/jim-adapter/src/zope/app/authentication/vocabulary.txt
  U   Zope3/branches/jim-adapter/src/zope/app/component/browser/__init__.py
  U   Zope3/branches/jim-adapter/src/zope/app/component/configure.zcml
  U   Zope3/branches/jim-adapter/src/zope/app/component/hooks.py
  U   Zope3/branches/jim-adapter/src/zope/app/component/site.py
  U   Zope3/branches/jim-adapter/src/zope/app/component/site.txt
  U   Zope3/branches/jim-adapter/src/zope/app/component/testing.py
  U   Zope3/branches/jim-adapter/src/zope/app/folder/folder.py
  U   Zope3/branches/jim-adapter/src/zope/app/form/browser/tests/test_add.py
  U   Zope3/branches/jim-adapter/src/zope/app/site/interfaces.py
  U   Zope3/branches/jim-adapter/src/zope/app/testing/setup.py
  U   Zope3/branches/jim-adapter/src/zope/app/tree/browser/cookie.py
  U   Zope3/branches/jim-adapter/src/zope/component/interfaces.py

-=-
Modified: Zope3/branches/jim-adapter/src/zope/app/authentication/vocabulary.txt
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/authentication/vocabulary.txt	2006-03-20 11:56:32 UTC (rev 66111)
+++ Zope3/branches/jim-adapter/src/zope/app/authentication/vocabulary.txt	2006-03-20 11:56:35 UTC (rev 66112)
@@ -52,7 +52,7 @@
     >>> auth = DemoAuth((p.name, p) for p in contained_plugins.values())
     
     >>> @component.adapter(interface.Interface)
-    ... @interface.implementer(component.ISiteManager)
+    ... @interface.implementer(component.IComponentLookup)
     ... def getSiteManager(context):
     ...     return component.getGlobalSiteManager()
     ...

Modified: Zope3/branches/jim-adapter/src/zope/app/component/browser/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/browser/__init__.py	2006-03-20 11:56:32 UTC (rev 66111)
+++ Zope3/branches/jim-adapter/src/zope/app/component/browser/__init__.py	2006-03-20 11:56:35 UTC (rev 66112)
@@ -15,7 +15,6 @@
 
 $Id$
 """
-from zope.component.interfaces import ISiteManager
 from zope.security.proxy import removeSecurityProxy
 from zope.app import zapi
 from zope.app.container.browser.adding import Adding

Modified: Zope3/branches/jim-adapter/src/zope/app/component/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/configure.zcml	2006-03-20 11:56:32 UTC (rev 66111)
+++ Zope3/branches/jim-adapter/src/zope/app/component/configure.zcml	2006-03-20 11:56:35 UTC (rev 66112)
@@ -61,7 +61,7 @@
         interface="zope.app.container.interfaces.IReadContainer" />
     <require
         permission="zope.ManageSite"
-        interface="zope.component.interfaces.ISiteManager
+        interface="zope.component.interfaces.IComponentLookup
                    zope.app.container.interfaces.IWriteContainer" />
   </content>
 
@@ -89,7 +89,7 @@
   </content>
   
   <adapter 
-      for="zope.component.interfaces.ISiteManager"
+      for="zope.component.interfaces.IComponentLookup"
       provides="zope.app.filerepresentation.interfaces.IDirectoryFactory"
       factory=".site.SMFolderFactory"
       permission="zope.ManageContent"
@@ -97,7 +97,7 @@
 
   <adapter
       for="zope.interface.Interface" 
-      provides="zope.component.interfaces.ISiteManager"
+      provides="zope.component.interfaces.IComponentLookup"
       factory=".site.SiteManagerAdapter"
       />
 

Modified: Zope3/branches/jim-adapter/src/zope/app/component/hooks.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/hooks.py	2006-03-20 11:56:32 UTC (rev 66111)
+++ Zope3/branches/jim-adapter/src/zope/app/component/hooks.py	2006-03-20 11:56:35 UTC (rev 66112)
@@ -86,7 +86,7 @@
     # We should really look look at this again though, especially
     # once site managers do less.  There's probably no good reason why
     # they can't be proxied.  Well, except maybe for performance.
-    sm = zope.component.interfaces.ISiteManager(
+    sm = zope.component.interfaces.IComponentLookup(
         context, zope.component.getGlobalSiteManager())
     return zope.security.proxy.removeSecurityProxy(sm)
 

Modified: Zope3/branches/jim-adapter/src/zope/app/component/site.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/site.py	2006-03-20 11:56:32 UTC (rev 66111)
+++ Zope3/branches/jim-adapter/src/zope/app/component/site.py	2006-03-20 11:56:35 UTC (rev 66112)
@@ -106,12 +106,12 @@
         if interfaces.ISite.providedBy(self):
             raise TypeError("Already a site")
 
-        if zope.component.interfaces.ISiteManager.providedBy(sm):
+        if zope.component.interfaces.IComponentLookup.providedBy(sm):
             self._sm = sm
             sm.__name__ = '++etc++site'
             sm.__parent__ = self
         else:
-            raise ValueError('setSiteManager requires an ISiteManager')
+            raise ValueError('setSiteManager requires an IComponentLookup')
 
         zope.interface.directlyProvides(
             self, interfaces.ISite,
@@ -343,7 +343,7 @@
 
 
 def SiteManagerAdapter(ob):
-    """An adapter from ILocation to ISiteManager.
+    """An adapter from ILocation to IComponentLookup.
 
     The ILocation is interpreted flexibly, we just check for
     ``__parent__``.

Modified: Zope3/branches/jim-adapter/src/zope/app/component/site.txt
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/site.txt	2006-03-20 11:56:32 UTC (rev 66111)
+++ Zope3/branches/jim-adapter/src/zope/app/component/site.txt	2006-03-20 11:56:35 UTC (rev 66112)
@@ -64,7 +64,7 @@
    >>> myfolder2.setSiteManager(object)
    Traceback (most recent call last):
    ...
-   ValueError: setSiteManager requires an ISiteManager
+   ValueError: setSiteManager requires an IComponentLookup
 
 Also, if the possible site has been changed to a site already, a `TypeError`
 is raised, when one attempts to add a new site manager:
@@ -79,12 +79,12 @@
 
   >>> myfolder['mysubfolder'] = folder.Folder()
   >>> import zope.component
-  >>> zope.component.interfaces.ISiteManager(myfolder['mysubfolder']) is sm
+  >>> zope.component.interfaces.IComponentLookup(myfolder['mysubfolder']) is sm
   True
 
 If the location passed is a site, the site manager of that site is returned:
 
-  >>> zope.component.interfaces.ISiteManager(myfolder) is sm
+  >>> zope.component.interfaces.IComponentLookup(myfolder) is sm
   True
 
 During traversal, 

Modified: Zope3/branches/jim-adapter/src/zope/app/component/testing.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/testing.py	2006-03-20 11:56:32 UTC (rev 66111)
+++ Zope3/branches/jim-adapter/src/zope/app/component/testing.py	2006-03-20 11:56:35 UTC (rev 66112)
@@ -17,7 +17,7 @@
 """
 import zope.interface
 from zope.component import site
-from zope.component.interfaces import ISiteManager
+from zope.component.interfaces import IComponentLookup
 from zope.app import zapi
 from zope.app.testing import setup
 from zope.app.testing.placelesssetup import PlacelessSetup
@@ -96,7 +96,7 @@
 
 
 class SiteManagerStub(object):
-    zope.interface.implements(ISiteManager)
+    zope.interface.implements(IComponentLookup)
     
     next = None
 
@@ -177,7 +177,7 @@
 
     sitemanager.provideUtility(interface, utility, name)
     utility.__conform__ = \
-       lambda iface: iface.isOrExtends(ISiteManager) and sitemanager or None
+       lambda iface: iface.isOrExtends(IComponentLookup) and sitemanager or None
     nextsitemanager.provideUtility(interface, nextutility, name)
     nextutility.__conform__ = \
-       lambda iface: iface.isOrExtends(ISiteManager) and nextsitemanager or None
+       lambda iface: iface.isOrExtends(IComponentLookup) and nextsitemanager or None

Modified: Zope3/branches/jim-adapter/src/zope/app/folder/folder.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/folder/folder.py	2006-03-20 11:56:32 UTC (rev 66111)
+++ Zope3/branches/jim-adapter/src/zope/app/folder/folder.py	2006-03-20 11:56:35 UTC (rev 66112)
@@ -126,8 +126,8 @@
       []
 
       >>> sm = Contained()
-      >>> from zope.component.interfaces import ISiteManager
-      >>> directlyProvides(sm, ISiteManager)
+      >>> from zope.component.interfaces import IComponentLookup
+      >>> directlyProvides(sm, IComponentLookup)
       >>> folder.setSiteManager(sm)
       >>> directlyProvides(folder, ISite)
       >>> subs = list(FolderSublocations(folder).sublocations())

Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/tests/test_add.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/tests/test_add.py	2006-03-20 11:56:32 UTC (rev 66111)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/tests/test_add.py	2006-03-20 11:56:35 UTC (rev 66112)
@@ -18,7 +18,7 @@
 import unittest
 
 from zope.component.interfaces import IFactory
-from zope.component.interfaces import ISiteManager
+from zope.component.interfaces import IComponentLookup
 from zope.component.factory import Factory
 from zope.interface import Interface, implements
 from zope.publisher.browser import TestRequest
@@ -287,7 +287,7 @@
                 return "."
 
         # register content factory for content factory id lookup
-        ztapi.provideAdapter(None, ISiteManager, SiteManagerAdapter)
+        ztapi.provideAdapter(None, IComponentLookup, SiteManagerAdapter)
         ztapi.provideUtility(IFactory, Factory(C), name='C')
         
         adding = Adding(self)

Modified: Zope3/branches/jim-adapter/src/zope/app/site/interfaces.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/site/interfaces.py	2006-03-20 11:56:32 UTC (rev 66111)
+++ Zope3/branches/jim-adapter/src/zope/app/site/interfaces.py	2006-03-20 11:56:35 UTC (rev 66112)
@@ -29,13 +29,7 @@
            'This interface has been moved to zope.app.component.interfaces. '
            'The reference will be gone in Zope 3.3.')
 
-ISiteManager = ILocalSiteManager
 
-deprecated('ISiteManager',
-           'This interface has been moved to zope.app.component.interfaces '
-           'and been renamed ISiteManager. '
-           'The reference will be gone in Zope 3.3.')
-
 class ILocalService(registration.IRegisterable):
     """A local service isn't a local service if it doesn't implement this.
 

Modified: Zope3/branches/jim-adapter/src/zope/app/testing/setup.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/testing/setup.py	2006-03-20 11:56:32 UTC (rev 66111)
+++ Zope3/branches/jim-adapter/src/zope/app/testing/setup.py	2006-03-20 11:56:35 UTC (rev 66112)
@@ -87,10 +87,10 @@
 #------------------------------------------------------------------------
 # ISiteManager lookup
 from zope.app.component.site import SiteManagerAdapter
-from zope.component.interfaces import ISiteManager
+from zope.component.interfaces import IComponentLookup
 from zope.interface import Interface
 def setUpSiteManagerLookup():
-    ztapi.provideAdapter(Interface, ISiteManager, SiteManagerAdapter)
+    ztapi.provideAdapter(Interface, IComponentLookup, SiteManagerAdapter)
 
 #------------------------------------------------------------------------
 # Placeful setup

Modified: Zope3/branches/jim-adapter/src/zope/app/tree/browser/cookie.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/tree/browser/cookie.py	2006-03-20 11:56:32 UTC (rev 66111)
+++ Zope3/branches/jim-adapter/src/zope/app/tree/browser/cookie.py	2006-03-20 11:56:35 UTC (rev 66112)
@@ -19,7 +19,7 @@
 from zope.app.container.interfaces import IContainer
 from zope.app.folder.interfaces import IFolder
 from zope.app.component.interfaces import ISite
-from zope.component.interfaces import ISiteManager
+from zope.component.interfaces import IComponentLookup
 from zope.app.traversing.interfaces import IContainmentRoot
 
 from zope.app.tree.filters import OnlyInterfacesFilter

Modified: Zope3/branches/jim-adapter/src/zope/component/interfaces.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/component/interfaces.py	2006-03-20 11:56:32 UTC (rev 66111)
+++ Zope3/branches/jim-adapter/src/zope/component/interfaces.py	2006-03-20 11:56:35 UTC (rev 66112)
@@ -52,7 +52,7 @@
         If `context` is `None`, return the global site manager.
 
         If the `context` is not `None`, it is expected that an adapter from
-        the `context` to `ISiteManager` can be found. If no adapter is found,
+        the `context` to `IComponentLookup` can be found. If no adapter is found,
         a `ComponentLookupError` is raised.
         """
 



More information about the Zope3-Checkins mailing list