Commit e173faa0 authored by Chris McDonough's avatar Chris McDonough

- 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.

parent df0a79ea
......@@ -5,10 +5,15 @@ CHANGES
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
......
......@@ -70,7 +70,7 @@ setup(name='zope.container',
'zope.schema',
'zope.component',
'zope.event',
'zope.location',
'zope.location>=3.5.4',
'zope.security',
'zope.lifecycleevent>=3.5.2',
'zope.i18nmessageid',
......
......@@ -425,7 +425,7 @@ def containers(*types):
>>> class IBar(IContainer):
... pass
>>> from zope.container.interfaces import IContained
>>> from zope.location.interfaces import IContained
>>> class IFooBarContained(IContained):
... containers(IFoo, IBar)
......
......@@ -7,7 +7,8 @@ of items that can be placed in containers or on the types of
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):
......
......@@ -28,7 +28,7 @@ from zope.security.checker import selectChecker, CombinedChecker
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
......
......@@ -30,6 +30,7 @@ from zope.lifecycleevent.interfaces import IObjectModifiedEvent
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 InvalidType(Invalid, TypeError):
class IContained(ILocation):
"""Objects contained in containers."""
class IItemContainer(IItemMapping):
"""Minimal readable container."""
......
......@@ -108,7 +108,7 @@ def test_declarations_on_ContainedProxy():
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 @@ def test_declarations_on_ContainedProxy():
>>> 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 @@ def test_declarations_on_ContainedProxy():
>>> 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 @@ def test_declarations_on_ContainedProxy():
>>> 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>)
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment