[Checkins] SVN: zope.copypastemove/trunk/ Use new ``zope.copy.copy`` instead of ``zope.location.pickling.locationCopy``.
Dan Korostelev
nadako at gmail.com
Sun Feb 8 18:02:24 EST 2009
Log message for revision 96287:
Use new ``zope.copy.copy`` instead of ``zope.location.pickling.locationCopy``.
Move ItemNotFoundError to interfaces.
Remove redundant DEPENDENCIES.cfg file.
Changed:
U zope.copypastemove/trunk/CHANGES.txt
U zope.copypastemove/trunk/setup.py
D zope.copypastemove/trunk/src/zope/copypastemove/DEPENDENCIES.cfg
U zope.copypastemove/trunk/src/zope/copypastemove/__init__.py
U zope.copypastemove/trunk/src/zope/copypastemove/interfaces.py
-=-
Modified: zope.copypastemove/trunk/CHANGES.txt
===================================================================
--- zope.copypastemove/trunk/CHANGES.txt 2009-02-08 22:46:38 UTC (rev 96286)
+++ zope.copypastemove/trunk/CHANGES.txt 2009-02-08 23:02:24 UTC (rev 96287)
@@ -1,28 +1,35 @@
-Changes
=======
+CHANGES
+=======
3.5.1 (unreleased)
------------------
-* ...
+- Use the new zope.copy package for ObjectCopier to provide pluggable
+ copying mechanism that is not dependent on zope.location hardly.
+- Move the ItemNotFoundError exception to the interfaces module as
+ it's part of public API. Old import still works as we actually
+ use it where it was previously defined, however, the new import
+ place is preferred.
+
3.5.0 (2009-01-31)
------------------
-* Use zope.container instead of zope.app.container.
+- Use zope.container instead of zope.app.container.
3.4.1 (2009-01-26)
------------------
-* Moved the test dependencies to a `test` extra requirement.
+- Moved the test dependencies to a `test` extra requirement.
3.4.0 (2007-09-28)
------------------
-* No further changes since 3.4.0a1.
+- No further changes since 3.4.0a1.
3.4.0a1 (2007-04-22)
--------------------
-* Initial release as a separate project, corresponds to
+- Initial release as a separate project, corresponds to
zope.copypastemove from Zope 3.4.0a1
Modified: zope.copypastemove/trunk/setup.py
===================================================================
--- zope.copypastemove/trunk/setup.py 2009-02-08 22:46:38 UTC (rev 96286)
+++ zope.copypastemove/trunk/setup.py 2009-02-08 23:02:24 UTC (rev 96287)
@@ -41,16 +41,18 @@
package_dir = {'': 'src'},
namespace_packages=['zope',],
extras_require=dict(
- test=['zope.app.testing', 'zope.app.principalannotation']),
+ test=['zope.app.testing',
+ 'zope.app.principalannotation']),
install_requires=['setuptools',
+ 'zope.annotation',
+ 'zope.component',
'zope.container',
+ 'zope.copy',
+ 'zope.event',
+ 'zope.exceptions',
'zope.interface',
- 'zope.exceptions',
- 'zope.component',
- 'zope.event',
+ 'zope.lifecycleevent',
'zope.location',
- 'zope.annotation',
- 'zope.lifecycleevent',
],
include_package_data = True,
zip_safe = False,
Deleted: zope.copypastemove/trunk/src/zope/copypastemove/DEPENDENCIES.cfg
===================================================================
--- zope.copypastemove/trunk/src/zope/copypastemove/DEPENDENCIES.cfg 2009-02-08 22:46:38 UTC (rev 96286)
+++ zope.copypastemove/trunk/src/zope/copypastemove/DEPENDENCIES.cfg 2009-02-08 23:02:24 UTC (rev 96287)
@@ -1,13 +0,0 @@
-zope.interface
-zope.exceptions
-zope.component
-zope.event
-zope.location
-zope.annotation
-zope.lifecycleevent
-zope.app.container
-
-#for testing
-zope.testing
-zope.app.component
-zope.app.principalannotation
Modified: zope.copypastemove/trunk/src/zope/copypastemove/__init__.py
===================================================================
--- zope.copypastemove/trunk/src/zope/copypastemove/__init__.py 2009-02-08 22:46:38 UTC (rev 96286)
+++ zope.copypastemove/trunk/src/zope/copypastemove/__init__.py 2009-02-08 23:02:24 UTC (rev 96287)
@@ -21,8 +21,8 @@
from zope.interface import implements, Invalid
from zope.exceptions import DuplicationError
from zope.component import adapts
+from zope.copy import copy
from zope.event import notify
-from zope.location.pickling import locationCopy
from zope.location.interfaces import ISublocations
from zope.annotation.interfaces import IAnnotations
from zope.annotation.interfaces import IAnnotations
@@ -32,7 +32,7 @@
from zope.copypastemove.interfaces import IObjectCopier
from zope.copypastemove.interfaces import IContainerItemRenamer
from zope.copypastemove.interfaces import IPrincipalClipboard
-from zope.copypastemove.interfaces import IItemNotFoundError
+from zope.copypastemove.interfaces import ItemNotFoundError
from zope.container.sample import SampleContainer
from zope.container.interfaces import IContainer, IOrderedContainer
@@ -40,9 +40,6 @@
from zope.container.interfaces import INameChooser
from zope.container.constraints import checkObject
-class ItemNotFoundError(LookupError):
- implements(IItemNotFoundError)
-
class ObjectMover(object):
"""Adapter for moving objects between containers
@@ -396,11 +393,10 @@
chooser = INameChooser(target)
new_name = chooser.chooseName(new_name, obj)
- copy = locationCopy(obj)
- copy.__parent__ = copy.__name__ = None
- notify(ObjectCopiedEvent(copy, obj))
+ new = copy(obj)
+ notify(ObjectCopiedEvent(new, obj))
- target[new_name] = copy
+ target[new_name] = new
return new_name
def copyable(self):
Modified: zope.copypastemove/trunk/src/zope/copypastemove/interfaces.py
===================================================================
--- zope.copypastemove/trunk/src/zope/copypastemove/interfaces.py 2009-02-08 22:46:38 UTC (rev 96286)
+++ zope.copypastemove/trunk/src/zope/copypastemove/interfaces.py 2009-02-08 23:02:24 UTC (rev 96287)
@@ -17,7 +17,7 @@
"""
__docformat__ = 'restructuredtext'
-from zope.interface import Interface
+from zope.interface import Interface, implements
class IObjectMover(Interface):
"""Use `IObjectMover(obj)` to move an object somewhere."""
@@ -93,3 +93,6 @@
class IItemNotFoundError(Interface):
pass
+
+class ItemNotFoundError(LookupError):
+ implements(IItemNotFoundError)
More information about the Checkins
mailing list