[Checkins] SVN: zope.traversing/trunk/ The RootPhysicallyLocatable is back now. Make the BBB import point to proper location. Add testing registrations.

Dan Korostelev nadako at gmail.com
Mon Feb 2 19:30:15 EST 2009


Log message for revision 96010:
  The RootPhysicallyLocatable is back now. Make the BBB import point to proper location. Add testing registrations.

Changed:
  U   zope.traversing/trunk/CHANGES.txt
  U   zope.traversing/trunk/setup.py
  U   zope.traversing/trunk/src/zope/traversing/adapters.py
  U   zope.traversing/trunk/src/zope/traversing/testing.py
  U   zope.traversing/trunk/src/zope/traversing/tests/test_conveniencefunctions.py
  U   zope.traversing/trunk/src/zope/traversing/tests/test_traverser.py

-=-
Modified: zope.traversing/trunk/CHANGES.txt
===================================================================
--- zope.traversing/trunk/CHANGES.txt	2009-02-03 00:19:19 UTC (rev 96009)
+++ zope.traversing/trunk/CHANGES.txt	2009-02-03 00:30:14 UTC (rev 96010)
@@ -5,7 +5,8 @@
 3.5.2 (unreleased)
 ------------------
 
-- ...
+- The RootPhysicallyLocatable is not the same as LocationPhysicallyLocatable
+  now in zope.location. Fix the import and testing setups.
 
 3.5.1 (2009-02-02)
 ------------------

Modified: zope.traversing/trunk/setup.py
===================================================================
--- zope.traversing/trunk/setup.py	2009-02-03 00:19:19 UTC (rev 96009)
+++ zope.traversing/trunk/setup.py	2009-02-03 00:30:14 UTC (rev 96010)
@@ -53,7 +53,7 @@
                         'zope.proxy',
                         'zope.publisher',
                         'zope.security',
-                        'zope.location>=3.5.1',
+                        'zope.location>=3.5.2dev',
                         ],
       include_package_data = True,
       zip_safe = False,

Modified: zope.traversing/trunk/src/zope/traversing/adapters.py
===================================================================
--- zope.traversing/trunk/src/zope/traversing/adapters.py	2009-02-03 00:19:19 UTC (rev 96009)
+++ zope.traversing/trunk/src/zope/traversing/adapters.py	2009-02-03 00:30:14 UTC (rev 96010)
@@ -28,9 +28,7 @@
 from zope.traversing.namespace import UnexpectedParameters
 from zope.traversing.namespace import nsParse
 
-# BBB: LocationPhysicallyLocatable does the same thing for root object
-# as the RootPhysicallyLocatable that used to be defined here.
-from zope.location.traversing import LocationPhysicallyLocatable as RootPhysicallyLocatable
+from zope.location.traversing import RootPhysicallyLocatable # BBB
 
 _marker = object()  # opaque marker that doesn't get security proxied
 

Modified: zope.traversing/trunk/src/zope/traversing/testing.py
===================================================================
--- zope.traversing/trunk/src/zope/traversing/testing.py	2009-02-03 00:19:19 UTC (rev 96009)
+++ zope.traversing/trunk/src/zope/traversing/testing.py	2009-02-03 00:30:14 UTC (rev 96010)
@@ -20,7 +20,8 @@
 import zope.component
 import zope.interface
 from zope.publisher.interfaces.browser import IDefaultBrowserLayer
-from zope.location.traversing import LocationPhysicallyLocatable
+from zope.location.traversing \
+    import LocationPhysicallyLocatable, RootPhysicallyLocatable
 from zope.location.interfaces import ILocationInfo, IRoot, ITraverser
 from zope.traversing.interfaces import ITraversable
 from zope.traversing.adapters import DefaultTraversable
@@ -34,7 +35,8 @@
     zope.component.provideAdapter(DefaultTraversable, (None,), ITraversable)
     zope.component.provideAdapter(LocationPhysicallyLocatable,
                                   (None,), ILocationInfo)
-
+    zope.component.provideAdapter(RootPhysicallyLocatable,
+                                  (IRoot,), ILocationInfo)
     # set up the 'etc' namespace
     zope.component.provideAdapter(etc, (None,), ITraversable, name="etc")
     zope.component.provideAdapter(etc, (None, None), ITraversable, name="etc")

Modified: zope.traversing/trunk/src/zope/traversing/tests/test_conveniencefunctions.py
===================================================================
--- zope.traversing/trunk/src/zope/traversing/tests/test_conveniencefunctions.py	2009-02-03 00:19:19 UTC (rev 96009)
+++ zope.traversing/trunk/src/zope/traversing/tests/test_conveniencefunctions.py	2009-02-03 00:30:14 UTC (rev 96010)
@@ -19,7 +19,8 @@
 
 import zope.component
 from zope.interface import directlyProvides
-from zope.location.traversing import LocationPhysicallyLocatable
+from zope.location.traversing \
+    import LocationPhysicallyLocatable, RootPhysicallyLocatable
 from zope.location.interfaces \
     import ILocationInfo, IRoot, LocationError, ITraverser
 from zope.security.proxy import Proxy
@@ -67,6 +68,8 @@
         zope.component.provideAdapter(DefaultTraversable, (None,), ITraversable)
         zope.component.provideAdapter(LocationPhysicallyLocatable, (None,),
                                       ILocationInfo)
+        zope.component.provideAdapter(RootPhysicallyLocatable,
+                                      (IRoot,), ILocationInfo)
 
     def testTraverse(self):
         from zope.traversing.api import traverse

Modified: zope.traversing/trunk/src/zope/traversing/tests/test_traverser.py
===================================================================
--- zope.traversing/trunk/src/zope/traversing/tests/test_traverser.py	2009-02-03 00:19:19 UTC (rev 96009)
+++ zope.traversing/trunk/src/zope/traversing/tests/test_traverser.py	2009-02-03 00:30:14 UTC (rev 96010)
@@ -20,7 +20,8 @@
 import zope.component
 from zope.interface import directlyProvides, implementedBy
 from zope.interface.verify import verifyClass
-from zope.location.traversing import LocationPhysicallyLocatable
+from zope.location.traversing \
+    import LocationPhysicallyLocatable, RootPhysicallyLocatable
 from zope.location.interfaces \
     import ILocationInfo, IRoot, LocationError, ITraverser
 from zope.security.interfaces import Unauthorized
@@ -84,6 +85,8 @@
         zope.component.provideAdapter(DefaultTraversable, (None,), ITraversable)
         zope.component.provideAdapter(LocationPhysicallyLocatable, (None,),
                                       ILocationInfo)
+        zope.component.provideAdapter(RootPhysicallyLocatable,
+                                      (IRoot,), ILocationInfo)
 
         # Build up a wrapper chain
         self.root = root = C('root')
@@ -172,6 +175,8 @@
         zope.component.provideAdapter(DefaultTraversable, (None,), ITraversable)
         zope.component.provideAdapter(LocationPhysicallyLocatable, (None,),
                                       ILocationInfo)
+        zope.component.provideAdapter(RootPhysicallyLocatable,
+                                      (IRoot,), ILocationInfo)
 
         self.root = root = C('root')
         directlyProvides(root, IRoot)



More information about the Checkins mailing list