[Checkins] SVN: zope.container/trunk/ - Rid ourselves of ``IContained`` interface. This interface was moved
Chris McDonough
chrism at plope.com
Sun May 17 13:41:53 EDT 2009
Log message for revision 100045:
- Rid ourselves of ``IContained`` interface. This interface was moved
to ``zope.location.interfaces``. A b/w compat import still exists
to keep old code running. Depend on ``zope.location``>=3.5.4.
Changed:
U zope.container/trunk/CHANGES.txt
U zope.container/trunk/setup.py
U zope.container/trunk/src/zope/container/constraints.py
U zope.container/trunk/src/zope/container/constraints.txt
U zope.container/trunk/src/zope/container/contained.py
U zope.container/trunk/src/zope/container/interfaces.py
U zope.container/trunk/src/zope/container/tests/test_contained.py
-=-
Modified: zope.container/trunk/CHANGES.txt
===================================================================
--- zope.container/trunk/CHANGES.txt 2009-05-17 17:37:20 UTC (rev 100044)
+++ zope.container/trunk/CHANGES.txt 2009-05-17 17:41:52 UTC (rev 100045)
@@ -5,10 +5,15 @@
3.8.2 (unreleased)
------------------
-- Rid ourselves of ``IObjectMovedEvent``, ``IObjectAddedEvent``,
- ``IObjectRemovedEvent`` interfaces and ``ObjectMovedEvent``,
- ``ObjectAddedEvent`` and ``ObjectRemovedEvent`` classes. All of
- these were moved to ``zope.lifecycleevent``. Depend on
+- Rid ourselves of ``IContained`` interface. This interface was moved
+ to ``zope.location.interfaces``. A b/w compat import still exists
+ to keep old code running. Depend on ``zope.location``>=3.5.4.
+
+- Rid ourselves of the implementations of ``IObjectMovedEvent``,
+ ``IObjectAddedEvent``, ``IObjectRemovedEvent`` interfaces and
+ ``ObjectMovedEvent``, ``ObjectAddedEvent`` and
+ ``ObjectRemovedEvent`` classes. B/w compat imports still exist.
+ All of these were moved to ``zope.lifecycleevent``. Depend on
``zope.lifecycleevent``>=3.5.2.
- Fix a bug in OrderedContainer where trying to set the value for a
Modified: zope.container/trunk/setup.py
===================================================================
--- zope.container/trunk/setup.py 2009-05-17 17:37:20 UTC (rev 100044)
+++ zope.container/trunk/setup.py 2009-05-17 17:41:52 UTC (rev 100045)
@@ -70,7 +70,7 @@
'zope.schema',
'zope.component',
'zope.event',
- 'zope.location',
+ 'zope.location>=3.5.4',
'zope.security',
'zope.lifecycleevent>=3.5.2',
'zope.i18nmessageid',
Modified: zope.container/trunk/src/zope/container/constraints.py
===================================================================
--- zope.container/trunk/src/zope/container/constraints.py 2009-05-17 17:37:20 UTC (rev 100044)
+++ zope.container/trunk/src/zope/container/constraints.py 2009-05-17 17:41:52 UTC (rev 100045)
@@ -425,7 +425,7 @@
>>> class IBar(IContainer):
... pass
- >>> from zope.container.interfaces import IContained
+ >>> from zope.location.interfaces import IContained
>>> class IFooBarContained(IContained):
... containers(IFoo, IBar)
Modified: zope.container/trunk/src/zope/container/constraints.txt
===================================================================
--- zope.container/trunk/src/zope/container/constraints.txt 2009-05-17 17:37:20 UTC (rev 100044)
+++ zope.container/trunk/src/zope/container/constraints.txt 2009-05-17 17:41:52 UTC (rev 100045)
@@ -7,7 +7,8 @@
containers an item can be placed in. We express these constraints in
interfaces. Let's define some container and item interfaces:
- >>> from zope.container.interfaces import IContainer, IContained
+ >>> from zope.container.interfaces import IContainer
+ >>> from zope.location.interfaces import IContained
>>> from zope.container.constraints import containers, contains
>>> class IBuddyFolder(IContainer):
Modified: zope.container/trunk/src/zope/container/contained.py
===================================================================
--- zope.container/trunk/src/zope/container/contained.py 2009-05-17 17:37:20 UTC (rev 100044)
+++ zope.container/trunk/src/zope/container/contained.py 2009-05-17 17:41:52 UTC (rev 100045)
@@ -28,7 +28,7 @@
from zope.lifecycleevent import ObjectModifiedEvent
from zope.container.i18n import ZopeMessageFactory as _
-from zope.container.interfaces import IContained
+from zope.location.interfaces import IContained
from zope.container.interfaces import INameChooser
from zope.container.interfaces import IReservedNames, NameReserved
from zope.container.interfaces import IContainerModifiedEvent
Modified: zope.container/trunk/src/zope/container/interfaces.py
===================================================================
--- zope.container/trunk/src/zope/container/interfaces.py 2009-05-17 17:37:20 UTC (rev 100044)
+++ zope.container/trunk/src/zope/container/interfaces.py 2009-05-17 17:41:52 UTC (rev 100045)
@@ -30,6 +30,7 @@
from zope.lifecycleevent.interfaces import IObjectMovedEvent
from zope.lifecycleevent.interfaces import IObjectAddedEvent
from zope.lifecycleevent.interfaces import IObjectRemovedEvent
+from zope.location.interfaces import IContained
# /end backwards compatibility imports
from zope.container.i18n import ZopeMessageFactory as _
@@ -51,10 +52,6 @@
-class IContained(ILocation):
- """Objects contained in containers."""
-
-
class IItemContainer(IItemMapping):
"""Minimal readable container."""
Modified: zope.container/trunk/src/zope/container/tests/test_contained.py
===================================================================
--- zope.container/trunk/src/zope/container/tests/test_contained.py 2009-05-17 17:37:20 UTC (rev 100044)
+++ zope.container/trunk/src/zope/container/tests/test_contained.py 2009-05-17 17:41:52 UTC (rev 100045)
@@ -108,7 +108,7 @@
It implements IContained and IPersistent:
>>> tuple(zope.interface.implementedBy(ContainedProxy))
- (<InterfaceClass zope.container.interfaces.IContained>,
+ (<InterfaceClass zope.location.interfaces.IContained>,
<InterfaceClass persistent.interfaces.IPersistent>)
A proxied object has IContainer, in addition to what the unproxied
@@ -116,7 +116,7 @@
>>> tuple(zope.interface.providedBy(p))
(<InterfaceClass zope.container.tests.test_contained.I1>,
- <InterfaceClass zope.container.interfaces.IContained>,
+ <InterfaceClass zope.location.interfaces.IContained>,
<InterfaceClass persistent.interfaces.IPersistent>)
>>> class I2(zope.interface.Interface):
@@ -125,7 +125,7 @@
>>> tuple(zope.interface.providedBy(p))
(<InterfaceClass zope.container.tests.test_contained.I2>,
<InterfaceClass zope.container.tests.test_contained.I1>,
- <InterfaceClass zope.container.interfaces.IContained>,
+ <InterfaceClass zope.location.interfaces.IContained>,
<InterfaceClass persistent.interfaces.IPersistent>)
We can declare interfaces through the proxy:
@@ -136,7 +136,7 @@
>>> tuple(zope.interface.providedBy(p))
(<InterfaceClass zope.container.tests.test_contained.I3>,
<InterfaceClass zope.container.tests.test_contained.I1>,
- <InterfaceClass zope.container.interfaces.IContained>,
+ <InterfaceClass zope.location.interfaces.IContained>,
<InterfaceClass persistent.interfaces.IPersistent>)
"""
More information about the Checkins
mailing list