[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/location/ Add adapts() declaration, hence simplify ZCML and update dependencies

Philipp von Weitershausen philikon at philikon.de
Thu Apr 6 13:12:04 EDT 2006


Log message for revision 66596:
  Add adapts() declaration, hence simplify ZCML and update dependencies
  

Changed:
  U   Zope3/branches/jim-adapter/src/zope/location/DEPENDENCIES.cfg
  U   Zope3/branches/jim-adapter/src/zope/location/configure.zcml
  U   Zope3/branches/jim-adapter/src/zope/location/traversing.py

-=-
Modified: Zope3/branches/jim-adapter/src/zope/location/DEPENDENCIES.cfg
===================================================================
--- Zope3/branches/jim-adapter/src/zope/location/DEPENDENCIES.cfg	2006-04-06 16:45:09 UTC (rev 66595)
+++ Zope3/branches/jim-adapter/src/zope/location/DEPENDENCIES.cfg	2006-04-06 17:12:03 UTC (rev 66596)
@@ -1,4 +1,5 @@
 zope.app # only for ISite
+zope.component
 zope.decorator
 zope.interface
 zope.proxy

Modified: Zope3/branches/jim-adapter/src/zope/location/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/location/configure.zcml	2006-04-06 16:45:09 UTC (rev 66595)
+++ Zope3/branches/jim-adapter/src/zope/location/configure.zcml	2006-04-06 17:12:03 UTC (rev 66596)
@@ -1,12 +1,5 @@
-<configure
-    xmlns="http://namespaces.zope.org/zope"
-    i18n_domain="zope"
-    >
+<configure xmlns="http://namespaces.zope.org/zope">
 
-  <adapter 
-      for="zope.location.interfaces.ILocation"
-      provides="zope.traversing.interfaces.IPhysicallyLocatable"
-      factory="zope.location.traversing.LocationPhysicallyLocatable" 
-      />
+  <adapter factory="zope.location.traversing.LocationPhysicallyLocatable" />
 
 </configure>

Modified: Zope3/branches/jim-adapter/src/zope/location/traversing.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/location/traversing.py	2006-04-06 16:45:09 UTC (rev 66595)
+++ Zope3/branches/jim-adapter/src/zope/location/traversing.py	2006-04-06 17:12:03 UTC (rev 66596)
@@ -15,19 +15,19 @@
 
 $Id$
 """
+import zope.component
 import zope.interface
 from zope.traversing.interfaces import IPhysicallyLocatable
-from zope.traversing.interfaces import IContainmentRoot
-from zope.traversing.interfaces import ITraverser
+from zope.traversing.interfaces import IContainmentRoot, ITraverser
 from zope.traversing.api import getParents
+from zope.location.interfaces import ILocation
+from zope.location.location import Location
 from zope.app.component.interfaces import ISite
-from zope.location.location import Location
 
-
 class LocationPhysicallyLocatable(object):
     """Provide location information for location objects
     """
-
+    zope.component.adapts(ILocation)
     zope.interface.implements(IPhysicallyLocatable)
 
     def __init__(self, context):



More information about the Zope3-Checkins mailing list