~ubuntu-branches/ubuntu/utopic/zope.container/utopic

« back to all changes in this revision

Viewing changes to PKG-INFO

  • Committer: Gediminas Paulauskas
  • Date: 2011-08-12 12:47:13 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: menesis@pov.lt-20110812124713-6vjm8q1wc7o31w0j
Tags: 3.12.0-0ubuntu1
* New upstream release.
  - Now includes a license.
* debian/patches: remove the automatic patch that added the license.
* Needs van.pydeb (>= 1.3.3) to correctly handle "zope.security[zcml]>=3.8"
  dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Metadata-Version: 1.0
2
2
Name: zope.container
3
 
Version: 3.11.2
 
3
Version: 3.12.0
4
4
Summary: Zope Container
5
5
Home-page: http://pypi.python.org/pypi/zope.container
6
 
Author: Zope Corporation and Contributors
 
6
Author: Zope Foundation and Contributors
7
7
Author-email: zope-dev@zope.org
8
8
License: ZPL 2.1
9
9
Description: This package define interfaces of container components, and provides
16
16
        
17
17
        
18
18
        =========================
19
 
        Containment constraints
 
19
         Containment constraints
20
20
        =========================
21
21
        
22
22
        Containment constraints allow us to express restrictions on the types
24
24
        containers an item can be placed in.  We express these constraints in
25
25
        interfaces.  Let's define some container and item interfaces:
26
26
        
27
 
        >>> from zope.container.interfaces import IContainer
28
 
        >>> from zope.location.interfaces import IContained
29
 
        >>> from zope.container.constraints import containers, contains
 
27
            >>> from zope.container.interfaces import IContainer
 
28
            >>> from zope.location.interfaces import IContained
 
29
            >>> from zope.container.constraints import containers, contains
30
30
        
31
 
        >>> class IBuddyFolder(IContainer):
32
 
        ...     contains('.IBuddy')
 
31
            >>> class IBuddyFolder(IContainer):
 
32
            ...     contains('.IBuddy')
33
33
        
34
34
        
35
35
        In this example, we used the contains function to declare that objects
38
38
        interface. This is because IBuddy hasn't been defined yet.  When we
39
39
        define IBuddy, we can use IBuddyFolder directly:
40
40
        
41
 
        >>> class IBuddy(IContained):
42
 
        ...     containers(IBuddyFolder)
 
41
            >>> class IBuddy(IContained):
 
42
            ...     containers(IBuddyFolder)
43
43
        
44
44
        
45
45
        Now, with these interfaces in place, we can define Buddy and
46
46
        BuddyFolder classes and verify that we can put buddies in buddy
47
47
        folders:
48
48
        
49
 
        >>> from zope import interface
50
 
        
51
 
        >>> class Buddy:
52
 
        ...     interface.implements(IBuddy)
53
 
        
54
 
        >>> class BuddyFolder:
55
 
        ...     interface.implements(IBuddyFolder)
56
 
        
57
 
        >>> from zope.container.constraints import checkObject, checkFactory
58
 
        >>> from zope.component.factory import Factory
59
 
        
60
 
        >>> checkObject(BuddyFolder(), 'x', Buddy())
61
 
        >>> checkFactory(BuddyFolder(), 'x', Factory(Buddy))
62
 
        True
 
49
            >>> from zope import interface
 
50
        
 
51
            >>> class Buddy:
 
52
            ...     interface.implements(IBuddy)
 
53
        
 
54
            >>> class BuddyFolder:
 
55
            ...     interface.implements(IBuddyFolder)
 
56
        
 
57
            >>> from zope.container.constraints import checkObject, checkFactory
 
58
            >>> from zope.component.factory import Factory
 
59
        
 
60
            >>> checkObject(BuddyFolder(), 'x', Buddy())
 
61
            >>> checkFactory(BuddyFolder(), 'x', Factory(Buddy))
 
62
            True
63
63
        
64
64
        If we try to use other containers or folders, we'll get errors:
65
65
        
66
 
        >>> class Container:
67
 
        ...     interface.implements(IContainer)
68
 
        
69
 
        >>> class Contained:
70
 
        ...     interface.implements(IContained)
71
 
        
72
 
        >>> checkObject(Container(), 'x', Buddy())
73
 
        ... # doctest: +ELLIPSIS
74
 
        Traceback (most recent call last):
75
 
        InvalidContainerType: ...
76
 
        
77
 
        >>> checkFactory(Container(), 'x', Factory(Buddy))
78
 
        False
79
 
        
80
 
        >>> checkObject(BuddyFolder(), 'x', Contained())
81
 
        ... # doctest: +ELLIPSIS
82
 
        Traceback (most recent call last):
83
 
        InvalidItemType: ...
84
 
        
85
 
        >>> checkFactory(BuddyFolder(), 'x', Factory(Contained))
86
 
        False
 
66
            >>> class Container:
 
67
            ...     interface.implements(IContainer)
 
68
        
 
69
            >>> class Contained:
 
70
            ...     interface.implements(IContained)
 
71
        
 
72
            >>> checkObject(Container(), 'x', Buddy())
 
73
            ... # doctest: +ELLIPSIS
 
74
            Traceback (most recent call last):
 
75
            InvalidContainerType: ...
 
76
        
 
77
            >>> checkFactory(Container(), 'x', Factory(Buddy))
 
78
            False
 
79
        
 
80
            >>> checkObject(BuddyFolder(), 'x', Contained())
 
81
            ... # doctest: +ELLIPSIS
 
82
            Traceback (most recent call last):
 
83
            InvalidItemType: ...
 
84
        
 
85
            >>> checkFactory(BuddyFolder(), 'x', Factory(Contained))
 
86
            False
87
87
        
88
88
        In the example, we defined the container first and then the items.  We
89
89
        could have defined these in the opposite order:
90
90
        
91
 
        >>> class IContact(IContained):
92
 
        ...     containers('.IContacts')
93
 
        
94
 
        >>> class IContacts(IContainer):
95
 
        ...     contains(IContact)
96
 
        
97
 
        >>> class Contact:
98
 
        ...     interface.implements(IContact)
99
 
        
100
 
        >>> class Contacts:
101
 
        ...     interface.implements(IContacts)
102
 
        
103
 
        >>> checkObject(Contacts(), 'x', Contact())
104
 
        
105
 
        >>> checkFactory(Contacts(), 'x', Factory(Contact))
106
 
        True
107
 
        
108
 
        >>> checkObject(Contacts(), 'x', Buddy())
109
 
        ... # doctest: +ELLIPSIS
110
 
        Traceback (most recent call last):
111
 
        InvalidItemType: ...
112
 
        
113
 
        >>> checkFactory(Contacts(), 'x', Factory(Buddy))
114
 
        False
115
 
        
116
 
        
 
91
            >>> class IContact(IContained):
 
92
            ...     containers('.IContacts')
 
93
        
 
94
            >>> class IContacts(IContainer):
 
95
            ...     contains(IContact)
 
96
        
 
97
            >>> class Contact:
 
98
            ...     interface.implements(IContact)
 
99
        
 
100
            >>> class Contacts:
 
101
            ...     interface.implements(IContacts)
 
102
        
 
103
            >>> checkObject(Contacts(), 'x', Contact())
 
104
        
 
105
            >>> checkFactory(Contacts(), 'x', Factory(Contact))
 
106
            True
 
107
        
 
108
            >>> checkObject(Contacts(), 'x', Buddy())
 
109
            ... # doctest: +ELLIPSIS
 
110
            Traceback (most recent call last):
 
111
            InvalidItemType: ...
 
112
        
 
113
            >>> checkFactory(Contacts(), 'x', Factory(Buddy))
 
114
            False
 
115
        
 
116
        The constraints prevent us from moving a container beneath itself (either into
 
117
        itself or another folder beneath it):
 
118
        
 
119
            >>> container = Container()
 
120
            >>> checkObject(container, 'x', container)
 
121
            Traceback (most recent call last):
 
122
            TypeError: Cannot add an object to itself or its children.
 
123
        
 
124
            >>> import zope.location.interfaces
 
125
            >>> import zope.interface
 
126
            >>> subcontainer = Container()
 
127
            >>> zope.interface.directlyProvides(subcontainer,
 
128
            ...     zope.location.interfaces.ILocation)
 
129
            >>> subcontainer.__parent__ = container
 
130
            >>> checkObject(subcontainer, 'x', container)
 
131
            Traceback (most recent call last):
 
132
            TypeError: Cannot add an object to itself or its children.
117
133
        
118
134
        
119
135
        =======
120
136
        CHANGES
121
137
        =======
122
138
        
123
 
        3.11.2 (2010-09-25)
 
139
        3.12.0 (2010-12-14)
124
140
        -------------------
125
141
        
126
 
        - Added not declared, but needed test dependency on `zope.testing`.
127
 
        
 
142
        - Fix detection of moving folders into itself or a subfolder of itself.
 
143
          (#118088)
 
144
        
 
145
        - Fixed ZCML-related tests and dependencies.
 
146
        
 
147
        - Added ``zcml`` extra dependencies.
128
148
        
129
149
        3.11.1 (2010-04-30)
130
150
        -------------------
132
152
        - Prefer the standard libraries doctest module to the one from zope.testing.
133
153
        
134
154
        - Added compatibility with ZODB3 3.10 by importing the IBroken interface from
135
 
        it directly. Once we can rely on the new ZODB3 version exclusively, we can
136
 
        remove the dependency onto the zope.broken distribution.
 
155
          it directly. Once we can rely on the new ZODB3 version exclusively, we can
 
156
          remove the dependency onto the zope.broken distribution.
137
157
        
138
158
        - Never fail if the suggested name is in a wrong type (#227617)
139
159
        
143
163
        -------------------
144
164
        
145
165
        - Copy two trivial classes from zope.cachedescriptors into this package, which
146
 
        allows us to remove that dependency. We didn't actually use any caching
147
 
        properties as the dependency suggested.
 
166
          allows us to remove that dependency. We didn't actually use any caching
 
167
          properties as the dependency suggested.
148
168
        
149
169
        3.10.1 (2009-12-29)
150
170
        -------------------
154
174
        - Removed no longer used zcml prefix from the configure file.
155
175
        
156
176
        - Stop importing DocTestSuite from zope.testing.doctestunit. Fixes
157
 
        compatibility problems with zope.testing 3.8.4.
 
177
          compatibility problems with zope.testing 3.8.4.
158
178
        
159
179
        3.10.0 (2009-12-15)
160
180
        -------------------
162
182
        - Break testing dependency on zope.app.testing.
163
183
        
164
184
        - Break testing dependency on zope.app.dependable by moving the code and tests
165
 
        into that package.
 
185
          into that package.
166
186
        
167
187
        - Import ISite from zope.component after it was moved there from
168
 
        zope.location.
 
188
          zope.location.
169
189
        
170
190
        3.9.1 (2009-10-18)
171
191
        ------------------
178
198
        ------------------
179
199
        
180
200
        - Previous releases should be versioned 3.9.0 as they are not pure bugfix
181
 
        releases and worth a "feature" release, increasing feature version.
182
 
        
183
 
        Packages that depend on any changes introduced in version 3.8.2 or 3.8.3
184
 
        should depend on version 3.9 or greater.
 
201
          releases and worth a "feature" release, increasing feature version.
 
202
          
 
203
          Packages that depend on any changes introduced in version 3.8.2 or 3.8.3
 
204
          should depend on version 3.9 or greater.
185
205
        
186
206
        3.8.3 (2009-08-27)
187
207
        ------------------
188
208
        
189
209
        - Move IXMLRPCPublisher ZCML registrations for containers from
190
 
        zope.app.publisher.xmlrpc to zope.container for now.
 
210
          zope.app.publisher.xmlrpc to zope.container for now.
191
211
        
192
212
        3.8.2 (2009-05-17)
193
213
        ------------------
194
214
        
195
215
        - Rid ourselves of ``IContained`` interface.  This interface was moved
196
 
        to ``zope.location.interfaces``.  A b/w compat import still exists
197
 
        to keep old code running.  Depend on ``zope.location``>=3.5.4.
 
216
          to ``zope.location.interfaces``.  A b/w compat import still exists
 
217
          to keep old code running.  Depend on ``zope.location``>=3.5.4.
198
218
        
199
219
        - Rid ourselves of the implementations of ``IObjectMovedEvent``,
200
 
        ``IObjectAddedEvent``, ``IObjectRemovedEvent`` interfaces and
201
 
        ``ObjectMovedEvent``, ``ObjectAddedEvent`` and
202
 
        ``ObjectRemovedEvent`` classes.  B/w compat imports still exist.
203
 
        All of these were moved to ``zope.lifecycleevent``. Depend on
204
 
        ``zope.lifecycleevent``>=3.5.2.
 
220
          ``IObjectAddedEvent``, ``IObjectRemovedEvent`` interfaces and
 
221
          ``ObjectMovedEvent``, ``ObjectAddedEvent`` and
 
222
          ``ObjectRemovedEvent`` classes.  B/w compat imports still exist.
 
223
          All of these were moved to ``zope.lifecycleevent``. Depend on
 
224
          ``zope.lifecycleevent``>=3.5.2.
205
225
        
206
226
        - Fix a bug in OrderedContainer where trying to set the value for a
207
 
        key that already exists (duplication error) would actually delete the
208
 
        key from the order, leaving a dangling reference.
 
227
          key that already exists (duplication error) would actually delete the
 
228
          key from the order, leaving a dangling reference.
209
229
        
210
230
        - Partially break dependency on ``zope.traversing`` by disusing
211
 
        zope.traversing.api.getPath in favor of using
212
 
        ILocationInfo(object).getPath().  The rest of the runtime
213
 
        dependencies on zope.traversing are currently interface
214
 
        dependencies.
 
231
          zope.traversing.api.getPath in favor of using
 
232
          ILocationInfo(object).getPath().  The rest of the runtime
 
233
          dependencies on zope.traversing are currently interface
 
234
          dependencies.
215
235
        
216
236
        - Break runtime dependency on ``zope.app.dependable`` by using a zcml
217
 
        condition on the qsubscriber ZCML directive that registers the
218
 
        CheckDependency handler for IObjectRemovedEvent.  If
219
 
        ``zope.app.dependable`` is not installed, this subscriber will never
220
 
        be registered.  ``zope.app.dependable`` is now a testing dependency
221
 
        only.
 
237
          condition on the qsubscriber ZCML directive that registers the
 
238
          CheckDependency handler for IObjectRemovedEvent.  If
 
239
          ``zope.app.dependable`` is not installed, this subscriber will never
 
240
          be registered.  ``zope.app.dependable`` is now a testing dependency
 
241
          only.
222
242
        
223
243
        3.8.1 (2009-04-03)
224
244
        ------------------
230
250
        ------------------
231
251
        
232
252
        - Change configure.zcml to not depend on zope.app.component.
233
 
        Fixes: https://bugs.launchpad.net/bugs/348329
 
253
          Fixes: https://bugs.launchpad.net/bugs/348329
234
254
        
235
255
        - Moved the declaration of ``IOrderedContainer.updateOrder``  to a new, basic
236
 
        ``IOrdered`` interface and let ``IOrderedContainer`` inherit it. This allows
237
 
        easier reuse of the declaration.
 
256
          ``IOrdered`` interface and let ``IOrderedContainer`` inherit it. This allows
 
257
          easier reuse of the declaration.
238
258
        
239
259
        3.7.2 (2009-03-12)
240
260
        ------------------
241
261
        
242
 
        - Fix: added missing ComponentLookupError, missing since revision 95429 and
243
 
        missing in last release.
 
262
        - Fix: added missing ComponentLookupError, missing since revision 95429 and 
 
263
          missing in last release.
244
264
        
245
265
        - Adapt to the move of IDefaultViewName from zope.component.interfaces
246
 
        to zope.publisher.interfaces.
 
266
          to zope.publisher.interfaces.
247
267
        
248
268
        - Add support for reserved names for containers. To specify reserved
249
 
        names for some container, you need to provide an adapter from the
250
 
        container to the ``zope.container.interfaces.IReservedNames`` interface.
251
 
        The default NameChooser is now also aware of reserved names.
 
269
          names for some container, you need to provide an adapter from the
 
270
          container to the ``zope.container.interfaces.IReservedNames`` interface.
 
271
          The default NameChooser is now also aware of reserved names.
252
272
        
253
273
        3.7.1 (2009-02-05)
254
274
        ------------------
255
275
        
256
276
        - Raise more "Pythonic" errors from ``__setitem__``, losing the dependency
257
 
        on ``zope.exceptions``:
258
 
        
259
 
        o ``zope.exceptions.DuplicationError`` -> ``KeyError``
260
 
        
261
 
        o ``zope.exceptions.UserError`` -> ``ValueError``
 
277
          on ``zope.exceptions``:
 
278
        
 
279
          o ``zope.exceptions.DuplicationError`` -> ``KeyError``
 
280
        
 
281
          o ``zope.exceptions.UserError`` -> ``ValueError``
262
282
        
263
283
        - Moved import of ``IBroken`` interface to use new ``zope.broken``
264
 
        package, which has no dependencies beyond ``zope.interface``.
 
284
          package, which has no dependencies beyond ``zope.interface``.
265
285
        
266
286
        - Made ``test`` part pull in the extra test requirements of this package.
267
287
        
268
288
        - Split the ``z3c.recipe.compattest`` configuration out into a new file,
269
 
        ``compat.cfg``, to reduce the burden of doing standard unit tests.
 
289
          ``compat.cfg``, to reduce the burden of doing standard unit tests.
270
290
        
271
291
        - Stripped out bogus develop eggs from ``buildout.cfg``.
272
292
        
274
294
        ------------------
275
295
        
276
296
        - Split this package off ``zope.app.container``. This package is
277
 
        intended to have far less dependencies than ``zope.app.container``.
 
297
          intended to have far less dependencies than ``zope.app.container``.
278
298
        
279
299
        - This package also contains the container implementation that
280
 
        used to be in ``zope.app.folder``.
 
300
          used to be in ``zope.app.folder``.
281
301
        
282
302
Keywords: zope container
283
303
Platform: UNKNOWN