[Checkins] SVN: zope.fssync/trunk/s - fix dependencies
Fred Drake
fdrake at gmail.com
Fri Oct 15 17:03:48 EDT 2010
Log message for revision 117582:
- fix dependencies
- add our own TLocation (no longer provided by zope.location)
- remove unused imports
Changed:
U zope.fssync/trunk/setup.py
U zope.fssync/trunk/src/zope/fssync/pickle.py
U zope.fssync/trunk/src/zope/fssync/synchronizer.py
U zope.fssync/trunk/src/zope/fssync/tests/test_docs.py
-=-
Modified: zope.fssync/trunk/setup.py
===================================================================
--- zope.fssync/trunk/setup.py 2010-10-15 20:20:43 UTC (rev 117581)
+++ zope.fssync/trunk/setup.py 2010-10-15 21:03:47 UTC (rev 117582)
@@ -57,9 +57,11 @@
install_requires = ['setuptools',
'zope.annotation',
'zope.component',
+ 'zope.dottedname',
'zope.filerepresentation',
'zope.interface',
'zope.lifecycleevent',
+ 'zope.location',
'zope.proxy',
'zope.traversing',
'zope.xmlpickle'],
Modified: zope.fssync/trunk/src/zope/fssync/pickle.py
===================================================================
--- zope.fssync/trunk/src/zope/fssync/pickle.py 2010-10-15 20:20:43 UTC (rev 117581)
+++ zope.fssync/trunk/src/zope/fssync/pickle.py 2010-10-15 21:03:47 UTC (rev 117582)
@@ -28,7 +28,6 @@
`loads()` function. The name of the outermost object is not stored in
the pickle unless it is stored in the object.
->>> from zope.location.tests import TLocation
>>> root = TLocation()
>>> interface.directlyProvides(root, IContainmentRoot)
>>> o1 = DataLocation('o1', root, 12)
@@ -85,8 +84,6 @@
from zope.location.interfaces import ILocation
from zope.location.traversing import LocationPhysicallyLocatable
-from zope.location.tests import TLocation
-from zope.traversing.interfaces import ITraverser
from zope.traversing.interfaces import IContainmentRoot
from zope.xmlpickle import xmlpickle
@@ -102,7 +99,6 @@
class PathPersistentIdGenerator(object):
"""Uses traversal paths as persistent ids.
- >>> from zope.location.tests import TLocation
>>> root = TLocation()
>>> interface.directlyProvides(root, IContainmentRoot)
>>> o1 = TLocation(); o1.__parent__ = root; o1.__name__ = 'o1'
@@ -284,6 +280,22 @@
return super(XMLUnpickler, self).load(StringIO(pickle))
+
+from zope.location.location import Location
+
+
+class TLocation(Location):
+ """Simple traversable location used in examples."""
+
+ interface.implements(traversing.interfaces.ITraverser)
+
+ def traverse(self, path, default=None, request=None):
+ o = self
+ for name in path.split(u'/'):
+ o = getattr(o, name)
+ return o
+
+
class DataLocation(TLocation):
"""Sample data container class used in doctests."""
Modified: zope.fssync/trunk/src/zope/fssync/synchronizer.py
===================================================================
--- zope.fssync/trunk/src/zope/fssync/synchronizer.py 2010-10-15 20:20:43 UTC (rev 117581)
+++ zope.fssync/trunk/src/zope/fssync/synchronizer.py 2010-10-15 21:03:47 UTC (rev 117582)
@@ -19,14 +19,12 @@
from zope import interface
from zope import component
from zope import annotation
-from zope import filerepresentation
from zope import lifecycleevent
from zope.dottedname.resolve import resolve
from zope.filerepresentation.interfaces import IFileFactory
from zope.filerepresentation.interfaces import IDirectoryFactory
-import metadata
import interfaces
def dottedname(klass):
Modified: zope.fssync/trunk/src/zope/fssync/tests/test_docs.py
===================================================================
--- zope.fssync/trunk/src/zope/fssync/tests/test_docs.py 2010-10-15 20:20:43 UTC (rev 117581)
+++ zope.fssync/trunk/src/zope/fssync/tests/test_docs.py 2010-10-15 21:03:47 UTC (rev 117582)
@@ -16,9 +16,7 @@
$Id: test_docs.py 70826 2006-10-20 03:41:16Z baijum $
"""
import os
-import sys
import unittest
-import tempfile
import zope
import py
@@ -27,9 +25,9 @@
from zope.traversing.interfaces import IContainmentRoot
-from zope.location.tests import TLocation
from zope.fssync import pickle
+from zope.fssync.pickle import TLocation
_test_dirs = []
More information about the checkins
mailing list