[Checkins] SVN: zope.location/trunk/ Moved ITraverser back to zope.traversing where it belongs conceptually. The
Thomas Lotze
tl at gocept.com
Thu Sep 24 07:19:54 EDT 2009
Log message for revision 104479:
Moved ITraverser back to zope.traversing where it belongs conceptually. The
interface had been moved to zope.location to invert the package
interdependency but is no longer used here.
Changed:
U zope.location/trunk/CHANGES.txt
U zope.location/trunk/setup.py
U zope.location/trunk/src/zope/location/interfaces.py
U zope.location/trunk/src/zope/location/tests.py
-=-
Modified: zope.location/trunk/CHANGES.txt
===================================================================
--- zope.location/trunk/CHANGES.txt 2009-09-24 11:19:14 UTC (rev 104478)
+++ zope.location/trunk/CHANGES.txt 2009-09-24 11:19:54 UTC (rev 104479)
@@ -10,6 +10,10 @@
- Actually removed deprecated PathPersistent class from
zope.location.pickling.
+- Moved ITraverser back to zope.traversing where it belongs conceptually. The
+ interface had been moved to zope.location to invert the package
+ interdependency but is no longer used here.
+
3.6.0 (2009-08-27)
------------------
Modified: zope.location/trunk/setup.py
===================================================================
--- zope.location/trunk/setup.py 2009-09-24 11:19:14 UTC (rev 104478)
+++ zope.location/trunk/setup.py 2009-09-24 11:19:54 UTC (rev 104479)
@@ -26,7 +26,7 @@
return text
setup(name='zope.location',
- version = '3.6.1dev',
+ version = '3.7.0dev',
author='Zope Corporation and Contributors',
author_email='zope-dev at zope.org',
description='Zope Location',
Modified: zope.location/trunk/src/zope/location/interfaces.py
===================================================================
--- zope.location/trunk/src/zope/location/interfaces.py 2009-09-24 11:19:14 UTC (rev 104478)
+++ zope.location/trunk/src/zope/location/interfaces.py 2009-09-24 11:19:54 UTC (rev 104479)
@@ -20,9 +20,7 @@
import zope.interface
import zope.schema
-_RAISE_KEYERROR = object()
-
class ILocation(zope.interface.Interface):
"""Objects that can be located in a hierachy.
@@ -112,30 +110,6 @@
"""
-
-
-class ITraverser(zope.interface.Interface):
- """Provide traverse features"""
-
- # XXX This is used like a utility but implemented as an adapter: The
- # traversal policy is only implemented once and repeated for all objects
- # along the path.
-
- def traverse(path, default=_RAISE_KEYERROR):
- """Return an object given a path.
-
- Path is either an immutable sequence of strings or a slash ('/')
- delimited string.
-
- If the first string in the path sequence is an empty string, or the
- path begins with a '/', start at the root. Otherwise the path is
- relative to the current context.
-
- If the object is not found, return 'default' argument.
-
- """
-
-
class LocationError(KeyError, LookupError):
"""There is no object for a given location."""
Modified: zope.location/trunk/src/zope/location/tests.py
===================================================================
--- zope.location/trunk/src/zope/location/tests.py 2009-09-24 11:19:14 UTC (rev 104478)
+++ zope.location/trunk/src/zope/location/tests.py 2009-09-24 11:19:54 UTC (rev 104479)
@@ -17,25 +17,10 @@
"""
import unittest
-import zope.interface
import zope.testing.doctest
from zope.testing.doctestunit import DocTestSuite
-from zope.location.interfaces import ITraverser
-from zope.location.location import Location
-class TLocation(Location):
- """Simple traversable location used in examples."""
-
- zope.interface.implements(ITraverser)
-
- def traverse(self, path, default=None, request=None):
- o = self
- for name in path.split(u'/'):
- o = getattr(o, name)
- return o
-
-
def test_suite():
return unittest.TestSuite((
zope.testing.doctest.DocFileSuite('location.txt'),
More information about the checkins
mailing list