[Checkins] SVN: zope.location/trunk/ - Removed dependency on zope.copy: the LocationCopyHook adapter is registered
Fabio Tranchitella
kobold at kobold.it
Wed Dec 23 08:17:17 EST 2009
Log message for revision 107006:
- Removed dependency on zope.copy: the LocationCopyHook adapter is registered
only if zope.copy is available.
- Use the standard Python doctest module instead of zope.testing.doctest, which
has been deprecated.
Changed:
U zope.location/trunk/CHANGES.txt
U zope.location/trunk/buildout.cfg
U zope.location/trunk/setup.py
U zope.location/trunk/src/zope/location/configure.zcml
U zope.location/trunk/src/zope/location/pickling.py
U zope.location/trunk/src/zope/location/tests.py
-=-
Modified: zope.location/trunk/CHANGES.txt
===================================================================
--- zope.location/trunk/CHANGES.txt 2009-12-23 13:12:06 UTC (rev 107005)
+++ zope.location/trunk/CHANGES.txt 2009-12-23 13:17:16 UTC (rev 107006)
@@ -2,10 +2,15 @@
CHANGES
=======
-3.8.1 (unreleased)
+3.8.1 (2009-12-23)
------------------
+- Removed dependency on zope.copy: the LocationCopyHook adapter is registered
+ only if zope.copy is available.
+- Use the standard Python doctest module instead of zope.testing.doctest, which
+ has been deprecated.
+
3.8.0 (2009-12-22)
------------------
Modified: zope.location/trunk/buildout.cfg
===================================================================
--- zope.location/trunk/buildout.cfg 2009-12-23 13:12:06 UTC (rev 107005)
+++ zope.location/trunk/buildout.cfg 2009-12-23 13:17:16 UTC (rev 107006)
@@ -4,11 +4,11 @@
[test]
recipe = zc.recipe.testrunner
-eggs = zope.location
+eggs = zope.location [test]
[coverage-test]
recipe = zc.recipe.testrunner
-eggs = zope.location
+eggs = zope.location [test]
defaults = ['--coverage', '../../coverage']
[coverage-report]
Modified: zope.location/trunk/setup.py
===================================================================
--- zope.location/trunk/setup.py 2009-12-23 13:12:06 UTC (rev 107005)
+++ zope.location/trunk/setup.py 2009-12-23 13:17:16 UTC (rev 107006)
@@ -26,7 +26,7 @@
return text
setup(name='zope.location',
- version = '3.8.1dev',
+ version = '3.8.1',
author='Zope Corporation and Contributors',
author_email='zope-dev at zope.org',
description='Zope Location',
@@ -56,13 +56,14 @@
packages=find_packages('src'),
package_dir = {'': 'src'},
namespace_packages=['zope',],
+ tests_require=['zope.copy'],
install_requires=['setuptools',
'zope.interface',
'zope.schema>=3.5.1dev',
'zope.component>=3.8.0',
'zope.proxy>3.3',
- 'zope.copy',
],
+ extras_require=dict(test=['zope.copy']),
include_package_data = True,
zip_safe = False,
)
Modified: zope.location/trunk/src/zope/location/configure.zcml
===================================================================
--- zope.location/trunk/src/zope/location/configure.zcml 2009-12-23 13:12:06 UTC (rev 107005)
+++ zope.location/trunk/src/zope/location/configure.zcml 2009-12-23 13:17:16 UTC (rev 107006)
@@ -1,7 +1,9 @@
-<configure xmlns="http://namespaces.zope.org/zope">
+<configure xmlns="http://namespaces.zope.org/zope"
+ zcml:xmlns="http://namespaces.zope.org/zcml">
<adapter factory=".location.LocationProxy" />
- <adapter factory=".pickling.LocationCopyHook" />
+ <adapter zcml:condition="installed zope.copy"
+ factory=".pickling.LocationCopyHook" />
<adapter factory=".traversing.LocationPhysicallyLocatable" />
<adapter factory=".traversing.RootPhysicallyLocatable" />
Modified: zope.location/trunk/src/zope/location/pickling.py
===================================================================
--- zope.location/trunk/src/zope/location/pickling.py 2009-12-23 13:12:06 UTC (rev 107005)
+++ zope.location/trunk/src/zope/location/pickling.py 2009-12-23 13:17:16 UTC (rev 107006)
@@ -18,13 +18,17 @@
__docformat__ = 'restructuredtext'
from zope.component import adapts
-from zope.copy.interfaces import ICopyHook, ResumeCopy
from zope.interface import implements
-
from zope.location.interfaces import ILocation
from zope.location.location import inside
+try:
+ from zope.copy.interfaces import ICopyHook, ResumeCopy
+except ImportError:
+ raise NotImplementedError("zope.location.pickling is not supported "
+ "because zope.copy is not available")
+
class LocationCopyHook(object):
"""Copy hook to preserve copying referenced objects that are not
located inside object that's being copied.
Modified: zope.location/trunk/src/zope/location/tests.py
===================================================================
--- zope.location/trunk/src/zope/location/tests.py 2009-12-23 13:12:06 UTC (rev 107005)
+++ zope.location/trunk/src/zope/location/tests.py 2009-12-23 13:17:16 UTC (rev 107006)
@@ -16,13 +16,13 @@
$Id$
"""
+import doctest
import unittest
-import zope.testing.doctest
def test_suite():
return unittest.TestSuite((
- zope.testing.doctest.DocFileSuite('location.txt'),
- zope.testing.doctest.DocTestSuite('zope.location.traversing'),
- zope.testing.doctest.DocTestSuite('zope.location.pickling'),
- ))
+ doctest.DocFileSuite('location.txt'),
+ doctest.DocTestSuite('zope.location.traversing'),
+ doctest.DocTestSuite('zope.location.pickling'),
+ ))
More information about the checkins
mailing list