[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/traversing/ Fix up imports to new location of zope.traversing.

Philipp von Weitershausen philikon at philikon.de
Wed Apr 5 07:55:26 EDT 2006


Log message for revision 66514:
  Fix up imports to new location of zope.traversing.
  (also, get rid of some imports of zapi here and there; we can't continue to
  use it here because we don't want to depend on zope.app)
  

Changed:
  U   Zope3/branches/jim-adapter/src/zope/traversing/adapters.py
  U   Zope3/branches/jim-adapter/src/zope/traversing/api.py
  U   Zope3/branches/jim-adapter/src/zope/traversing/browser/__init__.py
  U   Zope3/branches/jim-adapter/src/zope/traversing/browser/absoluteurl.py
  U   Zope3/branches/jim-adapter/src/zope/traversing/browser/configure.zcml
  U   Zope3/branches/jim-adapter/src/zope/traversing/browser/tests.py
  U   Zope3/branches/jim-adapter/src/zope/traversing/configure.zcml
  U   Zope3/branches/jim-adapter/src/zope/traversing/ftests/test_vhosting.py
  U   Zope3/branches/jim-adapter/src/zope/traversing/namespace.py
  U   Zope3/branches/jim-adapter/src/zope/traversing/tests/test_conveniencefunctions.py
  U   Zope3/branches/jim-adapter/src/zope/traversing/tests/test_etc.py
  U   Zope3/branches/jim-adapter/src/zope/traversing/tests/test_lang.py
  U   Zope3/branches/jim-adapter/src/zope/traversing/tests/test_namespacetrversal.py
  U   Zope3/branches/jim-adapter/src/zope/traversing/tests/test_physicallocationadapters.py
  U   Zope3/branches/jim-adapter/src/zope/traversing/tests/test_presentation.py
  U   Zope3/branches/jim-adapter/src/zope/traversing/tests/test_skin.py
  U   Zope3/branches/jim-adapter/src/zope/traversing/tests/test_traverser.py
  U   Zope3/branches/jim-adapter/src/zope/traversing/tests/test_vh.py
  D   Zope3/branches/jim-adapter/src/zope/traversing/tests/traversing.zcml

-=-
Modified: Zope3/branches/jim-adapter/src/zope/traversing/adapters.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/adapters.py	2006-04-05 11:53:36 UTC (rev 66513)
+++ Zope3/branches/jim-adapter/src/zope/traversing/adapters.py	2006-04-05 11:55:24 UTC (rev 66514)
@@ -18,14 +18,14 @@
 from types import StringTypes, MethodType
 from zope.interface import implements
 
-from zope.app.traversing.interfaces import TraversalError
-from zope.app.traversing.interfaces import IPhysicallyLocatable
-from zope.app.traversing.interfaces import IContainmentRoot
-from zope.app.traversing.interfaces import ITraverser, ITraversable
+from zope.traversing.interfaces import TraversalError
+from zope.traversing.interfaces import IPhysicallyLocatable
+from zope.traversing.interfaces import IContainmentRoot
+from zope.traversing.interfaces import ITraverser, ITraversable
 
-from zope.app.traversing.namespace import namespaceLookup
-from zope.app.traversing.namespace import UnexpectedParameters
-from zope.app.traversing.namespace import nsParse
+from zope.traversing.namespace import namespaceLookup
+from zope.traversing.namespace import UnexpectedParameters
+from zope.traversing.namespace import nsParse
 
 _marker = object()  # opaque marker that doesn't get security proxied
 

Modified: Zope3/branches/jim-adapter/src/zope/traversing/api.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/api.py	2006-04-05 11:53:36 UTC (rev 66513)
+++ Zope3/branches/jim-adapter/src/zope/traversing/api.py	2006-04-05 11:55:24 UTC (rev 66514)
@@ -16,9 +16,9 @@
 $Id$
 """
 from zope.interface import moduleProvides
-from zope.app.traversing.interfaces import IContainmentRoot, ITraversalAPI
-from zope.app.traversing.interfaces import ITraverser, IPhysicallyLocatable
-from zope.app.traversing.interfaces import TraversalError
+from zope.traversing.interfaces import IContainmentRoot, ITraversalAPI
+from zope.traversing.interfaces import ITraverser, IPhysicallyLocatable
+from zope.traversing.interfaces import TraversalError
 
 moduleProvides(ITraversalAPI)
 __all__ = tuple(ITraversalAPI)
@@ -221,4 +221,4 @@
     return _normalizePath(path)
 
 # import this down here to avoid circular imports
-from zope.app.traversing.adapters import traversePathElement
+from zope.traversing.adapters import traversePathElement

Modified: Zope3/branches/jim-adapter/src/zope/traversing/browser/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/browser/__init__.py	2006-04-05 11:53:36 UTC (rev 66513)
+++ Zope3/branches/jim-adapter/src/zope/traversing/browser/__init__.py	2006-04-05 11:55:24 UTC (rev 66514)
@@ -16,5 +16,5 @@
 $Id$
 """
 
-from zope.app.traversing.browser.absoluteurl import AbsoluteURL
-from zope.app.traversing.browser.absoluteurl import SiteAbsoluteURL
+from zope.traversing.browser.absoluteurl import AbsoluteURL
+from zope.traversing.browser.absoluteurl import SiteAbsoluteURL

Modified: Zope3/branches/jim-adapter/src/zope/traversing/browser/absoluteurl.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/browser/absoluteurl.py	2006-04-05 11:53:36 UTC (rev 66513)
+++ Zope3/branches/jim-adapter/src/zope/traversing/browser/absoluteurl.py	2006-04-05 11:55:24 UTC (rev 66514)
@@ -16,14 +16,15 @@
 $Id$
 """
 import urllib
+import zope.component
 from zope.interface import implements
 from zope.proxy import sameProxiedObjects
 from zope.publisher.browser import IBrowserRequest
+from zope.traversing.browser.interfaces import IAbsoluteURL
+from zope.i18nmessageid import MessageFactory
+_ = MessageFactory('zope')
 
-import zope.component
-from zope.app.i18n import ZopeMessageFactory as _
 from zope.app.publisher.browser import BrowserView
-from zope.app.traversing.browser.interfaces import IAbsoluteURL
 
 _insufficientContext = _("There isn't enough context to get URL information. "
                        "This is probably due to a bug in setting up location "

Modified: Zope3/branches/jim-adapter/src/zope/traversing/browser/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/browser/configure.zcml	2006-04-05 11:53:36 UTC (rev 66513)
+++ Zope3/branches/jim-adapter/src/zope/traversing/browser/configure.zcml	2006-04-05 11:55:24 UTC (rev 66514)
@@ -53,7 +53,7 @@
       />
 
   <view
-      for="zope.app.traversing.interfaces.IContainmentRoot"
+      for="zope.traversing.interfaces.IContainmentRoot"
       name="absolute_url"
       factory=".SiteAbsoluteURL"
       type="zope.publisher.interfaces.http.IHTTPRequest"
@@ -62,7 +62,7 @@
       />
       
   <view
-      for="zope.app.traversing.interfaces.IContainmentRoot"
+      for="zope.traversing.interfaces.IContainmentRoot"
       factory=".SiteAbsoluteURL"
       type="zope.publisher.interfaces.http.IHTTPRequest"
       permission="zope.Public"
@@ -78,7 +78,7 @@
       />
 
   <browser:page
-      for="zope.app.traversing.interfaces.IContainmentRoot"
+      for="zope.traversing.interfaces.IContainmentRoot"
       name="absolute_url"
       class=".SiteAbsoluteURL"
       permission="zope.Public"

Modified: Zope3/branches/jim-adapter/src/zope/traversing/browser/tests.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/browser/tests.py	2006-04-05 11:53:36 UTC (rev 66513)
+++ Zope3/branches/jim-adapter/src/zope/traversing/browser/tests.py	2006-04-05 11:55:24 UTC (rev 66514)
@@ -17,18 +17,20 @@
 """
 from unittest import TestCase, main, makeSuite
 
-from zope.app import zapi
-from zope.app.container.contained import contained
-from zope.app.testing import ztapi
-from zope.app.testing.placelesssetup import PlacelessSetup
-from zope.app.traversing.browser.absoluteurl import absoluteURL
-from zope.app.traversing.browser.interfaces import IAbsoluteURL
+import zope.component
+from zope.component import getMultiAdapter
+from zope.traversing.browser.absoluteurl import absoluteURL
+from zope.traversing.browser.interfaces import IAbsoluteURL
 from zope.i18n.interfaces import IUserPreferredCharsets
 from zope.interface import Interface, implements
 from zope.interface.verify import verifyObject
 from zope.publisher.browser import TestRequest
 from zope.publisher.http import IHTTPRequest, HTTPCharsets
 
+from zope.app.container.contained import contained
+from zope.app.testing import ztapi
+from zope.app.testing.placelesssetup import PlacelessSetup
+
 class IRoot(Interface):
     pass
 
@@ -42,30 +44,30 @@
 
     def setUp(self):
         super(TestAbsoluteURL, self).setUp()
-        from zope.app.traversing.browser import AbsoluteURL, SiteAbsoluteURL
+        from zope.traversing.browser import AbsoluteURL, SiteAbsoluteURL
         ztapi.browserView(None, 'absolute_url', AbsoluteURL)
         ztapi.browserView(IRoot, 'absolute_url', SiteAbsoluteURL)
         ztapi.browserView(None, '', AbsoluteURL, providing=IAbsoluteURL)
         ztapi.browserView(IRoot, '', SiteAbsoluteURL, providing=IAbsoluteURL)
-        ztapi.provideAdapter(IHTTPRequest, IUserPreferredCharsets,
-                             HTTPCharsets)
+        zope.component.provideAdapter(HTTPCharsets, (IHTTPRequest,),
+                                      IUserPreferredCharsets)
 
     def test_interface(self):
         request = TestRequest()
         content = contained(TrivialContent(), Root(), name='a')
-        view = zapi.getMultiAdapter((content, request), name='absolute_url')
+        view = getMultiAdapter((content, request), name='absolute_url')
 
         verifyObject(IAbsoluteURL, view)
 
     def testBadObject(self):
         request = TestRequest()
-        view = zapi.getMultiAdapter((42, request), name='absolute_url')
+        view = getMultiAdapter((42, request), name='absolute_url')
         self.assertRaises(TypeError, view.__str__)
         self.assertRaises(TypeError, absoluteURL, 42, request)
 
     def testNoContext(self):
         request = TestRequest()
-        view = zapi.getMultiAdapter((Root(), request), name='absolute_url')
+        view = getMultiAdapter((Root(), request), name='absolute_url')
         self.assertEqual(str(view), 'http://127.0.0.1')
         self.assertEqual(absoluteURL(Root(), request), 'http://127.0.0.1')
 
@@ -75,7 +77,7 @@
         content = contained(TrivialContent(), Root(), name='a')
         content = contained(TrivialContent(), content, name='b')
         content = contained(TrivialContent(), content, name='c')
-        view = zapi.getMultiAdapter((content, request), name='absolute_url')
+        view = getMultiAdapter((content, request), name='absolute_url')
         self.assertEqual(str(view), 'http://127.0.0.1/a/b/c')
         self.assertEqual(absoluteURL(content, request),
                          'http://127.0.0.1/a/b/c')
@@ -97,7 +99,7 @@
         content = contained(TrivialContent(), root, name=u'\u0442')
         content = contained(TrivialContent(), content, name=u'\u0435')
         content = contained(TrivialContent(), content, name=u'\u0441')
-        view = zapi.getMultiAdapter((content, request), name='absolute_url')
+        view = getMultiAdapter((content, request), name='absolute_url')
         self.assertEqual(str(view),
                          'http://127.0.0.1/%D0%B9/%D1%82/%D0%B5/%D1%81')
         self.assertEqual(view(),
@@ -128,7 +130,7 @@
         content = contained(TrivialContent(), Root(), name='a')
         content = contained(TrivialContent(), content, name='b')
         content = contained(TrivialContent(), content, name='c')
-        view = zapi.getMultiAdapter((content, request), name='absolute_url')
+        view = getMultiAdapter((content, request), name='absolute_url')
         base = 'http://127.0.0.1/++skin++test'
         self.assertEqual(str(view), base + '/a/b/c')
 
@@ -148,7 +150,7 @@
         request._vh_root = content
         content = contained(TrivialContent(), content, name='b')
         content = contained(TrivialContent(), content, name='c')
-        view = zapi.getMultiAdapter((content, request), name='absolute_url')
+        view = getMultiAdapter((content, request), name='absolute_url')
         self.assertEqual(str(view), 'http://127.0.0.1/b/c')
 
         breadcrumbs = view.breadcrumbs()
@@ -166,7 +168,7 @@
         request._vh_root = content
         content = contained(TrivialContent(), content, name='b')
         content = contained(TrivialContent(), content, name='c')
-        view = zapi.getMultiAdapter((content, request), name='absolute_url')
+        view = getMultiAdapter((content, request), name='absolute_url')
         self.assertEqual(str(view), 'http://127.0.0.1/b/c')
 
         breadcrumbs = view.breadcrumbs()
@@ -185,7 +187,7 @@
         content = contained(TrivialContent(), content, name='a')
         content = contained(TrivialContent(), content, name='b')
         content = contained(TrivialContent(), content, name='c')
-        view = zapi.getMultiAdapter((content, request), name='absolute_url')
+        view = getMultiAdapter((content, request), name='absolute_url')
         self.assertEqual(str(view), 'http://127.0.0.1/a/b/c')
 
         breadcrumbs = view.breadcrumbs()
@@ -198,14 +200,14 @@
 
     def testNoContextInformation(self):
         request = TestRequest()
-        view = zapi.getMultiAdapter((None, request), name='absolute_url')
+        view = getMultiAdapter((None, request), name='absolute_url')
         self.assertEqual(str(view), 'http://127.0.0.1')
         self.assertEqual(absoluteURL(None, request), 'http://127.0.0.1')
 
     def testVirtualHostingWithoutContextInformation(self):
         request = TestRequest()
         request._vh_root = contained(TrivialContent(), Root(), name='a')
-        view = zapi.getMultiAdapter((None, request), name='absolute_url')
+        view = getMultiAdapter((None, request), name='absolute_url')
         self.assertEqual(str(view), 'http://127.0.0.1')
         self.assertEqual(absoluteURL(None, request), 'http://127.0.0.1')
 

Modified: Zope3/branches/jim-adapter/src/zope/traversing/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/configure.zcml	2006-04-05 11:53:36 UTC (rev 66513)
+++ Zope3/branches/jim-adapter/src/zope/traversing/configure.zcml	2006-04-05 11:55:24 UTC (rev 66514)
@@ -2,116 +2,116 @@
 
 <adapter
     for="*"
-    factory="zope.app.traversing.adapters.Traverser"
-    provides="zope.app.traversing.interfaces.ITraverser" />
+    factory="zope.traversing.adapters.Traverser"
+    provides="zope.traversing.interfaces.ITraverser" />
 
 <adapter
     for="*"
-    factory="zope.app.traversing.adapters.DefaultTraversable"
-    provides="zope.app.traversing.interfaces.ITraversable" />
+    factory="zope.traversing.adapters.DefaultTraversable"
+    provides="zope.traversing.interfaces.ITraversable" />
 
 <adapter
-    provides="zope.app.traversing.interfaces.IPhysicallyLocatable"
-    for="zope.app.traversing.interfaces.IContainmentRoot"
-    factory="zope.app.traversing.adapters.RootPhysicallyLocatable" />
+    provides="zope.traversing.interfaces.IPhysicallyLocatable"
+    for="zope.traversing.interfaces.IContainmentRoot"
+    factory="zope.traversing.adapters.RootPhysicallyLocatable" />
 
 <adapter
     name="etc"
-    provides="zope.app.traversing.interfaces.ITraversable" for="*"
-    factory="zope.app.traversing.namespace.etc"
+    provides="zope.traversing.interfaces.ITraversable" for="*"
+    factory="zope.traversing.namespace.etc"
     />
 <view
     name="etc"
     type="zope.interface.Interface"
-    provides="zope.app.traversing.interfaces.ITraversable" for="*"
-    factory="zope.app.traversing.namespace.etc"
+    provides="zope.traversing.interfaces.ITraversable" for="*"
+    factory="zope.traversing.namespace.etc"
     />
 
 <adapter
     name="attribute"
-    provides="zope.app.traversing.interfaces.ITraversable" for="*"
-    factory="zope.app.traversing.namespace.attr"
+    provides="zope.traversing.interfaces.ITraversable" for="*"
+    factory="zope.traversing.namespace.attr"
     />
 <view
     name="attribute"
     type="zope.interface.Interface"
-    provides="zope.app.traversing.interfaces.ITraversable" for="*"
-    factory="zope.app.traversing.namespace.attr"
+    provides="zope.traversing.interfaces.ITraversable" for="*"
+    factory="zope.traversing.namespace.attr"
     />
 
 <adapter
     name="adapter"
-    provides="zope.app.traversing.interfaces.ITraversable" for="*"
-    factory="zope.app.traversing.namespace.adapter"
+    provides="zope.traversing.interfaces.ITraversable" for="*"
+    factory="zope.traversing.namespace.adapter"
     />
 <view
     name="adapter"
     type="zope.interface.Interface"
-    provides="zope.app.traversing.interfaces.ITraversable" for="*"
-    factory="zope.app.traversing.namespace.adapter"
+    provides="zope.traversing.interfaces.ITraversable" for="*"
+    factory="zope.traversing.namespace.adapter"
     />
 
 <adapter
     name="item"
-    provides="zope.app.traversing.interfaces.ITraversable" for="*"
-    factory="zope.app.traversing.namespace.item"
+    provides="zope.traversing.interfaces.ITraversable" for="*"
+    factory="zope.traversing.namespace.item"
     />
 <view
     name="item" type="*"
-    provides="zope.app.traversing.interfaces.ITraversable" for="*"
-    factory="zope.app.traversing.namespace.item"
+    provides="zope.traversing.interfaces.ITraversable" for="*"
+    factory="zope.traversing.namespace.item"
     />
 
 <adapter
     name="acquire"
-    provides="zope.app.traversing.interfaces.ITraversable" for="*"
-    factory="zope.app.traversing.namespace.acquire"
+    provides="zope.traversing.interfaces.ITraversable" for="*"
+    factory="zope.traversing.namespace.acquire"
     />
 <view
     name="acquire" type="*"
-    provides="zope.app.traversing.interfaces.ITraversable" for="*"
-    factory="zope.app.traversing.namespace.acquire"
+    provides="zope.traversing.interfaces.ITraversable" for="*"
+    factory="zope.traversing.namespace.acquire"
     />
 
 <view
     name="view" type="*"
-    provides="zope.app.traversing.interfaces.ITraversable" for="*"
-    factory="zope.app.traversing.namespace.view"
+    provides="zope.traversing.interfaces.ITraversable" for="*"
+    factory="zope.traversing.namespace.view"
     />
 
 <view
     name="resource" type="*"
-    provides="zope.app.traversing.interfaces.ITraversable" for="*"
-    factory="zope.app.traversing.namespace.resource"
+    provides="zope.traversing.interfaces.ITraversable" for="*"
+    factory="zope.traversing.namespace.resource"
     />
 
 <adapter
     name="lang"
-    provides="zope.app.traversing.interfaces.ITraversable" for="*"
-    factory="zope.app.traversing.namespace.lang"
+    provides="zope.traversing.interfaces.ITraversable" for="*"
+    factory="zope.traversing.namespace.lang"
     />
 <view
     name="lang" type="*"
-    provides="zope.app.traversing.interfaces.ITraversable" for="*"
-    factory="zope.app.traversing.namespace.lang"
+    provides="zope.traversing.interfaces.ITraversable" for="*"
+    factory="zope.traversing.namespace.lang"
     />
 
 <view
     name="skin" type="*"
-    provides="zope.app.traversing.interfaces.ITraversable" for="*"
-    factory="zope.app.traversing.namespace.skin"
+    provides="zope.traversing.interfaces.ITraversable" for="*"
+    factory="zope.traversing.namespace.skin"
     />
 
 <view
     name="vh" type="*"
-    provides="zope.app.traversing.interfaces.ITraversable" for="*"
-    factory="zope.app.traversing.namespace.vh"
+    provides="zope.traversing.interfaces.ITraversable" for="*"
+    factory="zope.traversing.namespace.vh"
     />
 
 <view
     name="debug" type="*"
-    provides="zope.app.traversing.interfaces.ITraversable" for="*"
-    factory="zope.app.traversing.namespace.debug"
+    provides="zope.traversing.interfaces.ITraversable" for="*"
+    factory="zope.traversing.namespace.debug"
     />
 
 </configure>

Modified: Zope3/branches/jim-adapter/src/zope/traversing/ftests/test_vhosting.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/ftests/test_vhosting.py	2006-04-05 11:53:36 UTC (rev 66513)
+++ Zope3/branches/jim-adapter/src/zope/traversing/ftests/test_vhosting.py	2006-04-05 11:55:24 UTC (rev 66514)
@@ -16,11 +16,11 @@
 $Id$
 """
 import unittest
+import transaction
 from zope.app.testing import ztapi, functional
 from zope.app.folder import Folder
-import transaction
 from zope.app.publisher.browser.resource import Resource
-from zope.app.traversing.api import traverse
+from zope.traversing.api import traverse
 from zope.security.checker import defineChecker, NamesChecker, NoProxy
 from zope.security.checker import _checkers, undefineChecker
 from zope.app.container.contained import Contained

Modified: Zope3/branches/jim-adapter/src/zope/traversing/namespace.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/namespace.py	2006-04-05 11:53:36 UTC (rev 66513)
+++ Zope3/branches/jim-adapter/src/zope/traversing/namespace.py	2006-04-05 11:55:24 UTC (rev 66514)
@@ -26,8 +26,8 @@
 from zope.publisher.browser import applySkin
 from zope.security.proxy import removeSecurityProxy
 
-from zope.app.traversing.interfaces import ITraversable, IPathAdapter
-from zope.app.traversing.interfaces import TraversalError
+from zope.traversing.interfaces import ITraversable, IPathAdapter
+from zope.traversing.interfaces import TraversalError
 
 class UnexpectedParameters(TraversalError):
     "Unexpected namespace parameters were provided."
@@ -296,7 +296,7 @@
 
 from zope.app.applicationcontrol.applicationcontrol \
      import applicationController
-from zope.app.traversing.interfaces import IContainmentRoot
+from zope.traversing.interfaces import IContainmentRoot
 
 class etc(SimpleHandler):
 

Modified: Zope3/branches/jim-adapter/src/zope/traversing/tests/test_conveniencefunctions.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/tests/test_conveniencefunctions.py	2006-04-05 11:53:36 UTC (rev 66513)
+++ Zope3/branches/jim-adapter/src/zope/traversing/tests/test_conveniencefunctions.py	2006-04-05 11:55:24 UTC (rev 66514)
@@ -19,19 +19,19 @@
 from zope.app.testing import ztapi
 from zope.interface import directlyProvides
 from zope.app.component.testing import PlacefulSetup
-from zope.app.traversing.adapters import Traverser
-from zope.app.traversing.interfaces import ITraverser, ITraversable
-from zope.app.traversing.adapters import DefaultTraversable
+from zope.traversing.adapters import Traverser
+from zope.traversing.interfaces import ITraverser, ITraversable
+from zope.traversing.adapters import DefaultTraversable
 
-from zope.app.traversing.interfaces import IPhysicallyLocatable
-from zope.app.traversing.interfaces import IContainmentRoot
+from zope.traversing.interfaces import IPhysicallyLocatable
+from zope.traversing.interfaces import IContainmentRoot
 from zope.app.location.traversing import LocationPhysicallyLocatable
-from zope.app.traversing.adapters import RootPhysicallyLocatable
+from zope.traversing.adapters import RootPhysicallyLocatable
 
 from zope.security.proxy import Proxy
 from zope.security.checker import selectChecker
 
-from zope.app.traversing.interfaces import TraversalError
+from zope.traversing.interfaces import TraversalError
 from zope.app.container.contained import contained
 
 class C(object):
@@ -77,14 +77,14 @@
               IContainmentRoot, IPhysicallyLocatable, RootPhysicallyLocatable)
 
     def testTraverse(self):
-        from zope.app.traversing.api import traverse
+        from zope.traversing.api import traverse
         self.assertEqual(
             traverse(self.item, '/folder/item'),
             self.tr.traverse('/folder/item')
             )
 
     def testTraverseFromUnwrapped(self):
-        from zope.app.traversing.api import traverse
+        from zope.traversing.api import traverse
         self.assertRaises(
             TypeError,
             traverse,
@@ -92,7 +92,7 @@
             )
 
     def testTraverseName(self):
-        from zope.app.traversing.api import traverseName
+        from zope.traversing.api import traverseName
         self.assertEqual(
             traverseName(self.folder, 'item'),
             self.tr.traverse('/folder/item')
@@ -109,7 +109,7 @@
         # TODO test that ++names++ and @@names work too
 
     def testTraverseNameBadValue(self):
-        from zope.app.traversing.api import traverseName
+        from zope.traversing.api import traverseName
         self.assertRaises(
             TraversalError,
             traverseName,
@@ -127,28 +127,28 @@
             )
 
     def testGetName(self):
-        from zope.app.traversing.api import getName
+        from zope.traversing.api import getName
         self.assertEqual(
             getName(self.item),
             'item'
             )
 
     def testGetParent(self):
-        from zope.app.traversing.api import getParent
+        from zope.traversing.api import getParent
         self.assertEqual(
             getParent(self.item),
             self.folder
             )
 
     def testGetParentFromRoot(self):
-        from zope.app.traversing.api import getParent
+        from zope.traversing.api import getParent
         self.assertEqual(
             getParent(self.root),
             None
             )
 
     def testGetParentBrokenChain(self):
-        from zope.app.traversing.api import getParent
+        from zope.traversing.api import getParent
         self.assertRaises(
             TypeError,
             getParent,
@@ -156,7 +156,7 @@
             )
 
     def testGetParentFromUnwrapped(self):
-        from zope.app.traversing.api import getParent
+        from zope.traversing.api import getParent
         self.assertRaises(
             TypeError,
             getParent,
@@ -164,14 +164,14 @@
             )
 
     def testGetParents(self):
-        from zope.app.traversing.api import getParents
+        from zope.traversing.api import getParents
         self.assertEqual(
             getParents(self.item),
             [self.folder, self.root]
             )
 
     def testGetParentsBrokenChain(self):
-        from zope.app.traversing.api import getParents
+        from zope.traversing.api import getParents
         self.assertRaises(
             TypeError,
             getParents,
@@ -179,7 +179,7 @@
             )
 
     def testGetParentFromUnwrapped(self):
-        from zope.app.traversing.api import getParent
+        from zope.traversing.api import getParent
         self.assertRaises(
             TypeError,
             getParent,
@@ -187,28 +187,28 @@
             )
 
     def testGetPath(self):
-        from zope.app.traversing.api import getPath
+        from zope.traversing.api import getPath
         self.assertEqual(
             getPath(self.item),
             u'/folder/item'
             )
 
     def testGetPathOfRoot(self):
-        from zope.app.traversing.api import getPath
+        from zope.traversing.api import getPath
         self.assertEqual(
             getPath(self.root),
             u'/',
             )
 
     def testGetNameOfRoot(self):
-        from zope.app.traversing.api import getName
+        from zope.traversing.api import getName
         self.assertEqual(
             getName(self.root),
             u'',
             )
 
     def testGetRoot(self):
-        from zope.app.traversing.api import getRoot
+        from zope.traversing.api import getRoot
         self.assertEqual(
             getRoot(self.item),
             self.root
@@ -256,7 +256,7 @@
             ),
         )
 
-        from zope.app.traversing.api import canonicalPath
+        from zope.traversing.api import canonicalPath
 
         for error_type, value in _bad_locations:
             self.assertRaises(error_type, canonicalPath, value)
@@ -308,7 +308,7 @@
         )
 
 
-        from zope.app.traversing.api import _normalizePath
+        from zope.traversing.api import _normalizePath
 
         for error_type, value in _bad_locations:
             self.assertRaises(error_type, _normalizePath, value)
@@ -320,7 +320,7 @@
                                  "failure on %s" % argument)
 
     def test_joinPath_slashes(self):
-        from zope.app.traversing.api import joinPath
+        from zope.traversing.api import joinPath
         path = u'/'
         args = ('/test', 'bla', '/foo', 'bar')
         self.assertRaises(ValueError, joinPath, path, *args)
@@ -329,7 +329,7 @@
         self.assertRaises(ValueError, joinPath, path, *args)
 
     def test_joinPath(self):
-        from zope.app.traversing.api import joinPath
+        from zope.traversing.api import joinPath
         path = u'/bla'
         args = ('foo', 'bar', 'baz', 'bone')
         self.assertEqual(joinPath(path, *args), u'/bla/foo/bar/baz/bone')
@@ -347,7 +347,7 @@
         self.assertRaises(ValueError, joinPath, path, *args)
 
     def test_joinPath_normalize(self):
-        from zope.app.traversing.api import joinPath
+        from zope.traversing.api import joinPath
         path = u'/bla'
         args = ('foo', 'bar', '..', 'baz', 'bone')
         self.assertEqual(joinPath(path, *args), u'/bla/foo/baz/bone')

Modified: Zope3/branches/jim-adapter/src/zope/traversing/tests/test_etc.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/tests/test_etc.py	2006-04-05 11:53:36 UTC (rev 66513)
+++ Zope3/branches/jim-adapter/src/zope/traversing/tests/test_etc.py	2006-04-05 11:55:24 UTC (rev 66514)
@@ -21,7 +21,7 @@
 class Test(CleanUp, TestCase):
 
     def testApplicationControl(self):
-        from zope.app.traversing.namespace import etc
+        from zope.traversing.namespace import etc
         from zope.app.applicationcontrol.applicationcontrol \
              import applicationController, applicationControllerRoot
 
@@ -30,7 +30,7 @@
             applicationController)
 
     def testSiteManager(self):
-        from zope.app.traversing.namespace import etc
+        from zope.traversing.namespace import etc
         class C(object):
             def getSiteManager(self): return 42
 

Modified: Zope3/branches/jim-adapter/src/zope/traversing/tests/test_lang.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/tests/test_lang.py	2006-04-05 11:53:36 UTC (rev 66513)
+++ Zope3/branches/jim-adapter/src/zope/traversing/tests/test_lang.py	2006-04-05 11:55:24 UTC (rev 66514)
@@ -15,7 +15,6 @@
 
 $Id$
 """
-
 import unittest
 
 from zope.interface import directlyProvides
@@ -30,7 +29,7 @@
 from zope.app.publisher.browser import ModifiableBrowserLanguages
 from zope.app.testing.placelesssetup import PlacelessSetup
 
-from zope.app.traversing.namespace import lang
+from zope.traversing.namespace import lang
 
 
 class TestRequest(test_browserlanguages.TestRequest):

Modified: Zope3/branches/jim-adapter/src/zope/traversing/tests/test_namespacetrversal.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/tests/test_namespacetrversal.py	2006-04-05 11:53:36 UTC (rev 66513)
+++ Zope3/branches/jim-adapter/src/zope/traversing/tests/test_namespacetrversal.py	2006-04-05 11:55:24 UTC (rev 66514)
@@ -21,7 +21,7 @@
 from zope.app.testing.placelesssetup import setUp, tearDown
 
 def test_suite():
-    return DocTestSuite('zope.app.traversing.namespace',
+    return DocTestSuite('zope.traversing.namespace',
                         setUp=setUp, tearDown=tearDown)
 
 if __name__ == '__main__':

Modified: Zope3/branches/jim-adapter/src/zope/traversing/tests/test_physicallocationadapters.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/tests/test_physicallocationadapters.py	2006-04-05 11:53:36 UTC (rev 66513)
+++ Zope3/branches/jim-adapter/src/zope/traversing/tests/test_physicallocationadapters.py	2006-04-05 11:55:24 UTC (rev 66514)
@@ -19,9 +19,9 @@
 from zope.app.testing.placelesssetup import PlacelessSetup
 from zope.app.testing import ztapi, setup
 from zope.interface import implements
+from zope.traversing.interfaces import IContainmentRoot
+from zope.traversing.interfaces import IPhysicallyLocatable
 
-from zope.app.traversing.interfaces import IContainmentRoot
-from zope.app.traversing.interfaces import IPhysicallyLocatable
 from zope.app.container.contained import contained
 from zope.app.component.site import SiteManagerContainer
 

Modified: Zope3/branches/jim-adapter/src/zope/traversing/tests/test_presentation.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/tests/test_presentation.py	2006-04-05 11:53:36 UTC (rev 66513)
+++ Zope3/branches/jim-adapter/src/zope/traversing/tests/test_presentation.py	2006-04-05 11:55:24 UTC (rev 66514)
@@ -16,12 +16,13 @@
 $Id$
 """
 from unittest import TestCase, main, makeSuite
-from zope.app.testing import ztapi
-from zope.app.testing.placelesssetup import PlacelessSetup
-from zope.app.traversing.namespace import view, resource
+from zope.traversing.namespace import view, resource
 from zope.interface import Interface, implements
 from zope.publisher.browser import TestRequest
 
+from zope.app.testing import ztapi
+from zope.app.testing.placelesssetup import PlacelessSetup
+
 class IContent(Interface):
     pass
 

Modified: Zope3/branches/jim-adapter/src/zope/traversing/tests/test_skin.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/tests/test_skin.py	2006-04-05 11:53:36 UTC (rev 66513)
+++ Zope3/branches/jim-adapter/src/zope/traversing/tests/test_skin.py	2006-04-05 11:55:24 UTC (rev 66514)
@@ -39,9 +39,8 @@
         ztapi.provideUtility(IBrowserSkinType, IFoo, 'foo')
 
     def test(self):
-        from zope.app.traversing.namespace import skin
+        from zope.traversing.namespace import skin
 
-
         request = FauxRequest()
         ob = object()
         ob2 = skin(ob, request).traverse('foo', ())

Modified: Zope3/branches/jim-adapter/src/zope/traversing/tests/test_traverser.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/tests/test_traverser.py	2006-04-05 11:53:36 UTC (rev 66513)
+++ Zope3/branches/jim-adapter/src/zope/traversing/tests/test_traverser.py	2006-04-05 11:55:24 UTC (rev 66514)
@@ -18,26 +18,22 @@
 import unittest
 
 from zope.app.testing import ztapi
-from zope.interface import directlyProvides
+from zope.interface import directlyProvides, implementedBy
 from zope.interface.verify import verifyClass
-from zope.interface import implementedBy
 
-from zope.app.traversing.interfaces import ITraverser, ITraversable
-from zope.app.traversing.adapters import Traverser, DefaultTraversable
+from zope.traversing.adapters import Traverser, DefaultTraversable
+from zope.traversing.adapters import RootPhysicallyLocatable
+from zope.traversing.interfaces import ITraverser, ITraversable
+from zope.traversing.interfaces import IPhysicallyLocatable
+from zope.traversing.interfaces import IContainmentRoot, TraversalError
 
-from zope.app.traversing.interfaces import IPhysicallyLocatable
-from zope.app.traversing.interfaces import IContainmentRoot
-from zope.app.location.traversing import LocationPhysicallyLocatable
-from zope.app.traversing.adapters import RootPhysicallyLocatable
-from zope.app.container.contained import contained
-
-from zope.app.traversing.interfaces import TraversalError
 from zope.security.interfaces import Unauthorized
-
-from zope.app.component.testing import PlacefulSetup
 from zope.security.checker \
     import ProxyFactory, defineChecker, CheckerPublic, Checker
 from zope.security.management import newInteraction, endInteraction
+
+from zope.app.location.traversing import LocationPhysicallyLocatable
+from zope.app.component.testing import PlacefulSetup
 from zope.app.container.contained import Contained, contained
 
 class ParticipationStub(object):

Modified: Zope3/branches/jim-adapter/src/zope/traversing/tests/test_vh.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/tests/test_vh.py	2006-04-05 11:53:36 UTC (rev 66513)
+++ Zope3/branches/jim-adapter/src/zope/traversing/tests/test_vh.py	2006-04-05 11:55:24 UTC (rev 66514)
@@ -44,7 +44,7 @@
 class TestVHNamespace(unittest.TestCase):
 
     def test_vh(self):
-        from zope.app.traversing.namespace import vh
+        from zope.traversing.namespace import vh
 
         # GET /folder1/++vh++/x/y/z/++/folder1_1
 
@@ -59,7 +59,7 @@
         self.assertEqual(request._app_server, 'http://server')
 
     def test_vh_noPlusPlus(self):
-        from zope.app.traversing.namespace import vh
+        from zope.traversing.namespace import vh
 
         # GET /folder1/folder2/++vh++http:host:80/folder1_1
         request = TestRequest(['folder1', 'folder2'], ['folder1_1'])
@@ -69,7 +69,7 @@
 
 
     def test_vh_host(self):
-        from zope.app.traversing.namespace import vh
+        from zope.traversing.namespace import vh
 
         request = TestRequest(['folder1'], ['folder1_1', '++'])
         ob = object()

Deleted: Zope3/branches/jim-adapter/src/zope/traversing/tests/traversing.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/tests/traversing.zcml	2006-04-05 11:53:36 UTC (rev 66513)
+++ Zope3/branches/jim-adapter/src/zope/traversing/tests/traversing.zcml	2006-04-05 11:55:24 UTC (rev 66514)
@@ -1,9 +0,0 @@
-<configure xmlns="http://namespaces.zope.org/zope">
-
-  <include package="zope.app.traversing" file="meta.zcml"/>
- 
-  <traversalNamespace
-      name="test"
-      handler=".test_directives.Handler" />
-
-</configure>



More information about the Zope3-Checkins mailing list