comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/lib/python3.8/site-packages/zope.interface-7.2.dist-info/METADATA @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
comparison
equal deleted inserted replaced
67:0e9998148a16 69:33d812a61356
1 Metadata-Version: 2.1
2 Name: zope.interface
3 Version: 7.2
4 Summary: Interfaces for Python
5 Home-page: https://github.com/zopefoundation/zope.interface
6 Author: Zope Foundation and Contributors
7 Author-email: zope-dev@zope.dev
8 License: ZPL 2.1
9 Keywords: interface,components,plugins
10 Classifier: Development Status :: 5 - Production/Stable
11 Classifier: Intended Audience :: Developers
12 Classifier: License :: OSI Approved :: Zope Public License
13 Classifier: Operating System :: OS Independent
14 Classifier: Programming Language :: Python
15 Classifier: Programming Language :: Python :: 3
16 Classifier: Programming Language :: Python :: 3.8
17 Classifier: Programming Language :: Python :: 3.9
18 Classifier: Programming Language :: Python :: 3.10
19 Classifier: Programming Language :: Python :: 3.11
20 Classifier: Programming Language :: Python :: 3.12
21 Classifier: Programming Language :: Python :: 3.13
22 Classifier: Programming Language :: Python :: Implementation :: CPython
23 Classifier: Programming Language :: Python :: Implementation :: PyPy
24 Classifier: Framework :: Zope :: 3
25 Classifier: Topic :: Software Development :: Libraries :: Python Modules
26 Requires-Python: >=3.8
27 Description-Content-Type: text/x-rst
28 License-File: LICENSE.txt
29 Requires-Dist: setuptools
30 Provides-Extra: docs
31 Requires-Dist: Sphinx ; extra == 'docs'
32 Requires-Dist: repoze.sphinx.autointerface ; extra == 'docs'
33 Requires-Dist: furo ; extra == 'docs'
34 Provides-Extra: test
35 Requires-Dist: coverage[toml] ; extra == 'test'
36 Requires-Dist: zope.event ; extra == 'test'
37 Requires-Dist: zope.testing ; extra == 'test'
38 Provides-Extra: testing
39 Requires-Dist: coverage[toml] ; extra == 'testing'
40 Requires-Dist: zope.event ; extra == 'testing'
41 Requires-Dist: zope.testing ; extra == 'testing'
42
43 ====================
44 ``zope.interface``
45 ====================
46
47 .. image:: https://img.shields.io/pypi/v/zope.interface.svg
48 :target: https://pypi.python.org/pypi/zope.interface/
49 :alt: Latest Version
50
51 .. image:: https://img.shields.io/pypi/pyversions/zope.interface.svg
52 :target: https://pypi.org/project/zope.interface/
53 :alt: Supported Python versions
54
55 .. image:: https://github.com/zopefoundation/zope.interface/actions/workflows/tests.yml/badge.svg
56 :target: https://github.com/zopefoundation/zope.interface/actions/workflows/tests.yml
57
58 .. image:: https://readthedocs.org/projects/zopeinterface/badge/?version=latest
59 :target: https://zopeinterface.readthedocs.io/en/latest/
60 :alt: Documentation Status
61
62 This package is intended to be independently reusable in any Python
63 project. It is maintained by the `Zope Toolkit project
64 <https://zopetoolkit.readthedocs.io/>`_.
65
66 This package provides an implementation of "object interfaces" for Python.
67 Interfaces are a mechanism for labeling objects as conforming to a given
68 API or contract. So, this package can be considered as implementation of
69 the `Design By Contract`_ methodology support in Python.
70
71 .. _Design By Contract: http://en.wikipedia.org/wiki/Design_by_contract
72
73 For detailed documentation, please see https://zopeinterface.readthedocs.io/en/latest/
74
75 =========
76 Changes
77 =========
78
79 7.2 (2024-11-28)
80 ================
81
82 - Add preliminary support for Python 3.14a2, this means that
83 ``.common.builtins.IByteString`` and ``.common.collections.IByteString`` are
84 no longer available from this Python version onwards as Python 3.14 dropped
85 ``collections.abc.ByteString``.
86
87
88 7.1.1 (2024-10-23)
89 ==================
90
91 - Fix segmentation faults in `weakrefobject.c` on Python 3.12 and 3.13.
92 (`#323 <https://github.com/zopefoundation/zope.interface/issues/323>`_)
93
94
95 7.1.0 (2024-10-10)
96 ==================
97
98 - Declare support for Python 3.13.
99
100 - Fix segmentation faults on Python 3.13.
101 (`#323 <https://github.com/zopefoundation/zope.interface/issues/323>`_)
102
103
104 7.0.3 (2024-08-27)
105 ==================
106
107 - Fix `Assertion 'memb->type == T_PYSSIZET' failed.` for Python < 3.12.
108 (`#319 <https://github.com/zopefoundation/zope.interface/issues/319>`_)
109
110
111 7.0.2 (2024-08-26)
112 ==================
113
114 - Fix reference-counting bug in C module initialization (broken in 7.0).
115 (`#316 <https://github.com/zopefoundation/zope.interface/issues/316>`_)
116
117
118 7.0.1 (2024-08-06)
119 ==================
120
121 - Fix subclassability of ``ObjectSpecificationDescriptor`` (broken in 7.0).
122 (`#312 <https://github.com/zopefoundation/zope.interface/issues/312>`_)
123
124
125 7.0 (2024-08-06)
126 ================
127
128 - Enable heap-based types (PEP 384) for Python >= 3.11.
129
130 - Adopt multi-phase module initialization (PEP 489).
131
132 - Drop support for Python 3.7.
133
134
135 6.4.post2 (2024-05-24)
136 ======================
137
138 - Publish missing Windows wheels, second attempt.
139 (`#295 <https://github.com/zopefoundation/zope.interface/issues/295>`_)
140
141
142 6.4.post1 (2024-05-23)
143 ======================
144
145 - Publish missing Windows wheels.
146 (`#295 <https://github.com/zopefoundation/zope.interface/issues/295>`_)
147
148
149 6.4.post0 (2024-05-22)
150 ======================
151
152 - The sdist of version 6.4 was uploaded to PyPI as
153 ``zope_interface-6.4.tar.gz`` instead of ``zope.interface-6.4-py2.tar.gz``
154 which cannot be installed by ``zc.buildout``. This release is a re-release
155 of version 6.4 with the correct sdist name.
156 (`#298 <https://github.com/zopefoundation/zope.interface/issues/298>`_)
157
158
159 6.4 (2024-05-15)
160 ================
161
162 - Adjust for incompatible changes in Python 3.13b1.
163 (`#292 <https://github.com/zopefoundation/zope.interface/issues/292>`_)
164
165 - Build windows wheels on GHA.
166
167 6.3 (2024-04-12)
168 ================
169
170 - Add preliminary support for Python 3.13 as of 3.13a6.
171
172
173 6.2 (2024-02-16)
174 ================
175
176 - Add preliminary support for Python 3.13 as of 3.13a3.
177
178 - Add support to use the pipe (``|``) syntax for ``typing.Union``.
179 (`#280 <https://github.com/zopefoundation/zope.interface/issues/280>`_)
180
181
182 6.1 (2023-10-05)
183 ================
184
185 - Build Linux binary wheels for Python 3.12.
186
187 - Add support for Python 3.12.
188
189 - Fix building of the docs for non-final versions.
190
191
192 6.0 (2023-03-17)
193 ================
194
195 - Build Linux binary wheels for Python 3.11.
196
197 - Drop support for Python 2.7, 3.5, 3.6.
198
199 - Fix test deprecation warning on Python 3.11.
200
201 - Add preliminary support for Python 3.12 as of 3.12a5.
202
203 - Drop:
204
205 + `zope.interface.implements`
206 + `zope.interface.implementsOnly`
207 + `zope.interface.classProvides`
208
209
210 5.5.2 (2022-11-17)
211 ==================
212
213 - Add support for building arm64 wheels on macOS.
214
215
216 5.5.1 (2022-11-03)
217 ==================
218
219 - Add support for final Python 3.11 release.
220
221
222 5.5.0 (2022-10-10)
223 ==================
224
225 - Add support for Python 3.10 and 3.11 (as of 3.11.0rc2).
226
227 - Add missing Trove classifier showing support for Python 3.9.
228
229 - Add some more entries to ``zope.interface.interfaces.__all__``.
230
231 - Disable unsafe math optimizations in C code. See `pull request 262
232 <https://github.com/zopefoundation/zope.interface/pull/262>`_.
233
234
235 5.4.0 (2021-04-15)
236 ==================
237
238 - Make the C implementation of the ``__providedBy__`` descriptor stop
239 ignoring all errors raised when accessing the instance's
240 ``__provides__``. Now it behaves like the Python version and only
241 catches ``AttributeError``. The previous behaviour could lead to
242 crashing the interpreter in cases of recursion and errors. See
243 `issue 239 <https://github.com/zopefoundation/zope.interface/issues>`_.
244
245 - Update the ``repr()`` and ``str()`` of various objects to be shorter
246 and more informative. In many cases, the ``repr()`` is now something
247 that can be evaluated to produce an equal object. For example, what
248 was previously printed as ``<implementedBy builtins.list>`` is now
249 shown as ``classImplements(list, IMutableSequence, IIterable)``. See
250 `issue 236 <https://github.com/zopefoundation/zope.interface/issues/236>`_.
251
252 - Make ``Declaration.__add__`` (as in ``implementedBy(Cls) +
253 ISomething``) try harder to preserve a consistent resolution order
254 when the two arguments share overlapping pieces of the interface
255 inheritance hierarchy. Previously, the right hand side was always
256 put at the end of the resolution order, which could easily produce
257 invalid orders. See `issue 193
258 <https://github.com/zopefoundation/zope.interface/issues/193>`_.
259
260 5.3.0 (2020-03-21)
261 ==================
262
263 - No changes from 5.3.0a1
264
265
266 5.3.0a1 (2021-03-18)
267 ====================
268
269 - Improve the repr of ``zope.interface.Provides`` to remove ambiguity
270 about what is being provided. This is especially helpful diagnosing
271 IRO issues.
272
273 - Allow subclasses of ``BaseAdapterRegistry`` (including
274 ``AdapterRegistry`` and ``VerifyingAdapterRegistry``) to have
275 control over the data structures. This allows persistent
276 implementations such as those based on ZODB to choose more scalable
277 options (e.g., BTrees instead of dicts). See `issue 224
278 <https://github.com/zopefoundation/zope.interface/issues/224>`_.
279
280 - Fix a reference counting issue in ``BaseAdapterRegistry`` that could
281 lead to references to interfaces being kept around even when all
282 utilities/adapters/subscribers providing that interface have been
283 removed. This is mostly an issue for persistent implementations.
284 Note that this only corrects the issue moving forward, it does not
285 solve any already corrupted reference counts. See `issue 227
286 <https://github.com/zopefoundation/zope.interface/issues/227>`_.
287
288 - Add the method ``BaseAdapterRegistry.rebuild()``. This can be used
289 to fix the reference counting issue mentioned above, as well as to
290 update the data structures when custom data types have changed.
291
292 - Add the interface method ``IAdapterRegistry.subscribed()`` and
293 implementation ``BaseAdapterRegistry.subscribed()`` for querying
294 directly registered subscribers. See `issue 230
295 <https://github.com/zopefoundation/zope.interface/issues/230>`_.
296
297 - Add the maintenance method
298 ``Components.rebuildUtilityRegistryFromLocalCache()``. Most users
299 will not need this, but it can be useful if the ``Components.utilities``
300 registry is suspected to be out of sync with the ``Components``
301 object itself (this might happen to persistent ``Components``
302 implementations in the face of bugs).
303
304 - Fix the ``Provides`` and ``ClassProvides`` descriptors to stop
305 allowing redundant interfaces (those already implemented by the
306 underlying class or meta class) to produce an inconsistent
307 resolution order. This is similar to the change in ``@implementer``
308 in 5.1.0, and resolves inconsistent resolution orders with
309 ``zope.proxy`` and ``zope.location``. See `issue 207
310 <https://github.com/zopefoundation/zope.interface/issues/207>`_.
311
312 5.2.0 (2020-11-05)
313 ==================
314
315 - Add documentation section ``Persistency and Equality``
316 (`#218 <https://github.com/zopefoundation/zope.interface/issues/218>`_).
317
318 - Create arm64 wheels.
319
320 - Add support for Python 3.9.
321
322
323 5.1.2 (2020-10-01)
324 ==================
325
326 - Make sure to call each invariant only once when validating invariants.
327 Previously, invariants could be called multiple times because when an
328 invariant is defined in an interface, it's found by in all interfaces
329 inheriting from that interface. See `pull request 215
330 <https://github.com/zopefoundation/zope.interface/pull/215/>`_.
331
332 5.1.1 (2020-09-30)
333 ==================
334
335 - Fix the method definitions of ``IAdapterRegistry.subscribe``,
336 ``subscriptions`` and ``subscribers``. Previously, they all were
337 defined to accept a ``name`` keyword argument, but subscribers have
338 no names and the implementation of that interface did not accept
339 that argument. See `issue 208
340 <https://github.com/zopefoundation/zope.interface/issues/208>`_.
341
342 - Fix a potential reference leak in the C optimizations. Previously,
343 applications that dynamically created unique ``Specification``
344 objects (e.g., used ``@implementer`` on dynamic classes) could
345 notice a growth of small objects over time leading to increased
346 garbage collection times. See `issue 216
347 <https://github.com/zopefoundation/zope.interface/issues/216>`_.
348
349 .. caution::
350
351 This leak could prevent interfaces used as the bases of
352 other interfaces from being garbage collected. Those interfaces
353 will now be collected.
354
355 One way in which this would manifest was that ``weakref.ref``
356 objects (and things built upon them, like
357 ``Weak[Key|Value]Dictionary``) would continue to have access to
358 the original object even if there were no other visible
359 references to Python and the original object *should* have been
360 collected. This could be especially problematic for the
361 ``WeakKeyDictionary`` when combined with dynamic or local
362 (created in the scope of a function) interfaces, since interfaces
363 are hashed based just on their name and module name. See the
364 linked issue for an example of a resulting ``KeyError``.
365
366 Note that such potential errors are not new, they are just once
367 again a possibility.
368
369 5.1.0 (2020-04-08)
370 ==================
371
372 - Make ``@implementer(*iface)`` and ``classImplements(cls, *iface)``
373 ignore redundant interfaces. If the class already implements an
374 interface through inheritance, it is no longer redeclared
375 specifically for *cls*. This solves many instances of inconsistent
376 resolution orders, while still allowing the interface to be declared
377 for readability and maintenance purposes. See `issue 199
378 <https://github.com/zopefoundation/zope.interface/issues/199>`_.
379
380 - Remove all bare ``except:`` statements. Previously, when accessing
381 special attributes such as ``__provides__``, ``__providedBy__``,
382 ``__class__`` and ``__conform__``, this package wrapped such access
383 in a bare ``except:`` statement, meaning that many errors could pass
384 silently; typically this would result in a fallback path being taken
385 and sometimes (like with ``providedBy()``) the result would be
386 non-sensical. This is especially true when those attributes are
387 implemented with descriptors. Now, only ``AttributeError`` is
388 caught. This makes errors more obvious.
389
390 Obviously, this means that some exceptions will be propagated
391 differently than before. In particular, ``RuntimeError`` raised by
392 Acquisition in the case of circular containment will now be
393 propagated. Previously, when adapting such a broken object, a
394 ``TypeError`` would be the common result, but now it will be a more
395 informative ``RuntimeError``.
396
397 In addition, ZODB errors like ``POSKeyError`` could now be
398 propagated where previously they would ignored by this package.
399
400 See `issue 200 <https://github.com/zopefoundation/zope.interface/issues/200>`_.
401
402 - Require that the second argument (*bases*) to ``InterfaceClass`` is
403 a tuple. This only matters when directly using ``InterfaceClass`` to
404 create new interfaces dynamically. Previously, an individual
405 interface was allowed, but did not work correctly. Now it is
406 consistent with ``type`` and requires a tuple.
407
408 - Let interfaces define custom ``__adapt__`` methods. This implements
409 the other side of the :pep:`246` adaptation protocol: objects being
410 adapted could already implement ``__conform__`` if they know about
411 the interface, and now interfaces can implement ``__adapt__`` if
412 they know about particular objects. There is no performance penalty
413 for interfaces that do not supply custom ``__adapt__`` methods.
414
415 This includes the ability to add new methods, or override existing
416 interface methods using the new ``@interfacemethod`` decorator.
417
418 See `issue 3 <https://github.com/zopefoundation/zope.interface/issues/3>`_.
419
420 - Make the internal singleton object returned by APIs like
421 ``implementedBy`` and ``directlyProvidedBy`` for objects that
422 implement or provide no interfaces more immutable. Previously an
423 internal cache could be mutated. See `issue 204
424 <https://github.com/zopefoundation/zope.interface/issues/204>`_.
425
426 5.0.2 (2020-03-30)
427 ==================
428
429 - Ensure that objects that implement no interfaces (such as direct
430 subclasses of ``object``) still include ``Interface`` itself in
431 their ``__iro___`` and ``__sro___``. This fixes adapter registry
432 lookups for such objects when the adapter is registered for
433 ``Interface``. See `issue 197
434 <https://github.com/zopefoundation/zope.interface/issues/197>`_.
435
436
437 5.0.1 (2020-03-21)
438 ==================
439
440 - Ensure the resolution order for ``InterfaceClass`` is consistent.
441 See `issue 192 <https://github.com/zopefoundation/zope.interface/issues/192>`_.
442
443 - Ensure the resolution order for ``collections.OrderedDict`` is
444 consistent on CPython 2. (It was already consistent on Python 3 and PyPy).
445
446 - Fix the handling of the ``ZOPE_INTERFACE_STRICT_IRO`` environment
447 variable. Previously, ``ZOPE_INTERFACE_STRICT_RO`` was read, in
448 contrast with the documentation. See `issue 194
449 <https://github.com/zopefoundation/zope.interface/issues/194>`_.
450
451
452 5.0.0 (2020-03-19)
453 ==================
454
455 - Make an internal singleton object returned by APIs like
456 ``implementedBy`` and ``directlyProvidedBy`` immutable. Previously,
457 it was fully mutable and allowed changing its ``__bases___``. That
458 could potentially lead to wrong results in pathological corner
459 cases. See `issue 158
460 <https://github.com/zopefoundation/zope.interface/issues/158>`_.
461
462 - Support the ``PURE_PYTHON`` environment variable at runtime instead
463 of just at wheel build time. A value of 0 forces the C extensions to
464 be used (even on PyPy) failing if they aren't present. Any other
465 value forces the Python implementation to be used, ignoring the C
466 extensions. See `PR 151 <https://github.com/zopefoundation/zope.interface/pull/151>`_.
467
468 - Cache the result of ``__hash__`` method in ``InterfaceClass`` as a
469 speed optimization. The method is called very often (i.e several
470 hundred thousand times during Plone 5.2 startup). Because the hash value never
471 changes it can be cached. This improves test performance from 0.614s
472 down to 0.575s (1.07x faster). In a real world Plone case a reindex
473 index came down from 402s to 320s (1.26x faster). See `PR 156
474 <https://github.com/zopefoundation/zope.interface/pull/156>`_.
475
476 - Change the C classes ``SpecificationBase`` and its subclass
477 ``ClassProvidesBase`` to store implementation attributes in their structures
478 instead of their instance dictionaries. This eliminates the use of
479 an undocumented private C API function, and helps make some
480 instances require less memory. See `PR 154 <https://github.com/zopefoundation/zope.interface/pull/154>`_.
481
482 - Reduce memory usage in other ways based on observations of usage
483 patterns in Zope (3) and Plone code bases.
484
485 - Specifications with no dependents are common (more than 50%) so
486 avoid allocating a ``WeakKeyDictionary`` unless we need it.
487 - Likewise, tagged values are relatively rare, so don't allocate a
488 dictionary to hold them until they are used.
489 - Use ``__slots___`` or the C equivalent ``tp_members`` in more
490 common places. Note that this removes the ability to set arbitrary
491 instance variables on certain objects.
492 See `PR 155 <https://github.com/zopefoundation/zope.interface/pull/155>`_.
493
494 The changes in this release resulted in a 7% memory reduction after
495 loading about 6,000 modules that define about 2,200 interfaces.
496
497 .. caution::
498
499 Details of many private attributes have changed, and external use
500 of those private attributes may break. In particular, the
501 lifetime and default value of ``_v_attrs`` has changed.
502
503 - Remove support for hashing uninitialized interfaces. This could only
504 be done by subclassing ``InterfaceClass``. This has generated a
505 warning since it was first added in 2011 (3.6.5). Please call the
506 ``InterfaceClass`` constructor or otherwise set the appropriate
507 fields in your subclass before attempting to hash or sort it. See
508 `issue 157 <https://github.com/zopefoundation/zope.interface/issues/157>`_.
509
510 - Remove unneeded override of the ``__hash__`` method from
511 ``zope.interface.declarations.Implements``. Watching a reindex index
512 process in ZCatalog with on a Py-Spy after 10k samples the time for
513 ``.adapter._lookup`` was reduced from 27.5s to 18.8s (~1.5x faster).
514 Overall reindex index time shrunk from 369s to 293s (1.26x faster).
515 See `PR 161
516 <https://github.com/zopefoundation/zope.interface/pull/161>`_.
517
518 - Make the Python implementation closer to the C implementation by
519 ignoring all exceptions, not just ``AttributeError``, during (parts
520 of) interface adaptation. See `issue 163
521 <https://github.com/zopefoundation/zope.interface/issues/163>`_.
522
523 - Micro-optimization in ``.adapter._lookup`` , ``.adapter._lookupAll``
524 and ``.adapter._subscriptions``: By loading ``components.get`` into
525 a local variable before entering the loop a bytcode "LOAD_FAST 0
526 (components)" in the loop can be eliminated. In Plone, while running
527 all tests, average speedup of the "owntime" of ``_lookup`` is ~5x.
528 See `PR 167
529 <https://github.com/zopefoundation/zope.interface/pull/167>`_.
530
531 - Add ``__all__`` declarations to all modules. This helps tools that
532 do auto-completion and documentation and results in less cluttered
533 results. Wildcard ("*") are not recommended and may be affected. See
534 `issue 153
535 <https://github.com/zopefoundation/zope.interface/issues/153>`_.
536
537 - Fix ``verifyClass`` and ``verifyObject`` for builtin types like
538 ``dict`` that have methods taking an optional, unnamed argument with
539 no default value like ``dict.pop``. On PyPy3, the verification is
540 strict, but on PyPy2 (as on all versions of CPython) those methods
541 cannot be verified and are ignored. See `issue 118
542 <https://github.com/zopefoundation/zope.interface/issues/118>`_.
543
544 - Update the common interfaces ``IEnumerableMapping``,
545 ``IExtendedReadMapping``, ``IExtendedWriteMapping``,
546 ``IReadSequence`` and ``IUniqueMemberWriteSequence`` to no longer
547 require methods that were removed from Python 3 on Python 3, such as
548 ``__setslice___``. Now, ``dict``, ``list`` and ``tuple`` properly
549 verify as ``IFullMapping``, ``ISequence`` and ``IReadSequence,``
550 respectively on all versions of Python.
551
552 - Add human-readable ``__str___`` and ``__repr___`` to ``Attribute``
553 and ``Method``. These contain the name of the defining interface
554 and the attribute. For methods, it also includes the signature.
555
556 - Change the error strings raised by ``verifyObject`` and
557 ``verifyClass``. They now include more human-readable information
558 and exclude extraneous lines and spaces. See `issue 170
559 <https://github.com/zopefoundation/zope.interface/issues/170>`_.
560
561 .. caution:: This will break consumers (such as doctests) that
562 depended on the exact error messages.
563
564 - Make ``verifyObject`` and ``verifyClass`` report all errors, if the
565 candidate object has multiple detectable violations. Previously they
566 reported only the first error. See `issue
567 <https://github.com/zopefoundation/zope.interface/issues/171>`_.
568
569 Like the above, this will break consumers depending on the exact
570 output of error messages if more than one error is present.
571
572 - Add ``zope.interface.common.collections``,
573 ``zope.interface.common.numbers``, and ``zope.interface.common.io``.
574 These modules define interfaces based on the ABCs defined in the
575 standard library ``collections.abc``, ``numbers`` and ``io``
576 modules, respectively. Importing these modules will make the
577 standard library concrete classes that are registered with those
578 ABCs declare the appropriate interface. See `issue 138
579 <https://github.com/zopefoundation/zope.interface/issues/138>`_.
580
581 - Add ``zope.interface.common.builtins``. This module defines
582 interfaces of common builtin types, such as ``ITextString`` and
583 ``IByteString``, ``IDict``, etc. These interfaces extend the
584 appropriate interfaces from ``collections`` and ``numbers``, and the
585 standard library classes implement them after importing this module.
586 This is intended as a replacement for third-party packages like
587 `dolmen.builtins <https://pypi.org/project/dolmen.builtins/>`_.
588 See `issue 138 <https://github.com/zopefoundation/zope.interface/issues/138>`_.
589
590 - Make ``providedBy()`` and ``implementedBy()`` respect ``super``
591 objects. For instance, if class ``Derived`` implements ``IDerived``
592 and extends ``Base`` which in turn implements ``IBase``, then
593 ``providedBy(super(Derived, derived))`` will return ``[IBase]``.
594 Previously it would have returned ``[IDerived]`` (in general, it
595 would previously have returned whatever would have been returned
596 without ``super``).
597
598 Along with this change, adapter registries will unpack ``super``
599 objects into their ``__self___`` before passing it to the factory.
600 Together, this means that ``component.getAdapter(super(Derived,
601 self), ITarget)`` is now meaningful.
602
603 See `issue 11 <https://github.com/zopefoundation/zope.interface/issues/11>`_.
604
605 - Fix a potential interpreter crash in the low-level adapter
606 registry lookup functions. See issue 11.
607
608 - Adopt Python's standard `C3 resolution order
609 <https://www.python.org/download/releases/2.3/mro/>`_ to compute the
610 ``__iro__`` and ``__sro__`` of interfaces, with tweaks to support
611 additional cases that are common in interfaces but disallowed for
612 Python classes. Previously, an ad-hoc ordering that made no
613 particular guarantees was used.
614
615 This has many beneficial properties, including the fact that base
616 interface and base classes tend to appear near the end of the
617 resolution order instead of the beginning. The resolution order in
618 general should be more predictable and consistent.
619
620 .. caution::
621 In some cases, especially with complex interface inheritance
622 trees or when manually providing or implementing interfaces, the
623 resulting IRO may be quite different. This may affect adapter
624 lookup.
625
626 The C3 order enforces some constraints in order to be able to
627 guarantee a sensible ordering. Older versions of zope.interface did
628 not impose similar constraints, so it was possible to create
629 interfaces and declarations that are inconsistent with the C3
630 constraints. In that event, zope.interface will still produce a
631 resolution order equal to the old order, but it won't be guaranteed
632 to be fully C3 compliant. In the future, strict enforcement of C3
633 order may be the default.
634
635 A set of environment variables and module constants allows
636 controlling several aspects of this new behaviour. It is possible to
637 request warnings about inconsistent resolution orders encountered,
638 and even to forbid them. Differences between the C3 resolution order
639 and the previous order can be logged, and, in extreme cases, the
640 previous order can still be used (this ability will be removed in
641 the future). For details, see the documentation for
642 ``zope.interface.ro``.
643
644 - Make inherited tagged values in interfaces respect the resolution
645 order (``__iro__``), as method and attribute lookup does. Previously
646 tagged values could give inconsistent results. See `issue 190
647 <https://github.com/zopefoundation/zope.interface/issues/190>`_.
648
649 - Add ``getDirectTaggedValue`` (and related methods) to interfaces to
650 allow accessing tagged values irrespective of inheritance. See
651 `issue 190
652 <https://github.com/zopefoundation/zope.interface/issues/190>`_.
653
654 - Ensure that ``Interface`` is always the last item in the ``__iro__``
655 and ``__sro__``. This is usually the case, but if classes that do
656 not implement any interfaces are part of a class inheritance
657 hierarchy, ``Interface`` could be assigned too high a priority.
658 See `issue 8 <https://github.com/zopefoundation/zope.interface/issues/8>`_.
659
660 - Implement sorting, equality, and hashing in C for ``Interface``
661 objects. In micro benchmarks, this makes those operations 40% to 80%
662 faster. This translates to a 20% speed up in querying adapters.
663
664 Note that this changes certain implementation details. In
665 particular, ``InterfaceClass`` now has a non-default metaclass, and
666 it is enforced that ``__module__`` in instances of
667 ``InterfaceClass`` is read-only.
668
669 See `PR 183 <https://github.com/zopefoundation/zope.interface/pull/183>`_.
670
671
672 4.7.2 (2020-03-10)
673 ==================
674
675 - Remove deprecated use of setuptools features. See `issue 30
676 <https://github.com/zopefoundation/zope.interface/issues/30>`_.
677
678
679 4.7.1 (2019-11-11)
680 ==================
681
682 - Use Python 3 syntax in the documentation. See `issue 119
683 <https://github.com/zopefoundation/zope.interface/issues/119>`_.
684
685
686 4.7.0 (2019-11-11)
687 ==================
688
689 - Drop support for Python 3.4.
690
691 - Change ``queryTaggedValue``, ``getTaggedValue``,
692 ``getTaggedValueTags`` in interfaces. They now include inherited
693 values by following ``__bases__``. See `PR 144
694 <https://github.com/zopefoundation/zope.interface/pull/144>`_.
695
696 .. caution:: This may be a breaking change.
697
698 - Add support for Python 3.8.
699
700
701 4.6.0 (2018-10-23)
702 ==================
703
704 - Add support for Python 3.7
705
706 - Fix ``verifyObject`` for class objects with staticmethods on
707 Python 3. See `issue 126
708 <https://github.com/zopefoundation/zope.interface/issues/126>`_.
709
710
711 4.5.0 (2018-04-19)
712 ==================
713
714 - Drop support for 3.3, avoid accidental dependence breakage via setup.py.
715 See `PR 110 <https://github.com/zopefoundation/zope.interface/pull/110>`_.
716 - Allow registering and unregistering instance methods as listeners.
717 See `issue 12 <https://github.com/zopefoundation/zope.interface/issues/12>`_
718 and `PR 102 <https://github.com/zopefoundation/zope.interface/pull/102>`_.
719 - Synchronize and simplify zope/__init__.py. See `issue 114
720 <https://github.com/zopefoundation/zope.interface/issues/114>`_
721
722
723 4.4.3 (2017-09-22)
724 ==================
725
726 - Avoid exceptions when the ``__annotations__`` attribute is added to
727 interface definitions with Python 3.x type hints. See `issue 98
728 <https://github.com/zopefoundation/zope.interface/issues/98>`_.
729 - Fix the possibility of a rare crash in the C extension when
730 deallocating items. See `issue 100
731 <https://github.com/zopefoundation/zope.interface/issues/100>`_.
732
733
734 4.4.2 (2017-06-14)
735 ==================
736
737 - Fix a regression storing
738 ``zope.component.persistentregistry.PersistentRegistry`` instances.
739 See `issue 85 <https://github.com/zopefoundation/zope.interface/issues/85>`_.
740
741 - Fix a regression that could lead to the utility registration cache
742 of ``Components`` getting out of sync. See `issue 93
743 <https://github.com/zopefoundation/zope.interface/issues/93>`_.
744
745 4.4.1 (2017-05-13)
746 ==================
747
748 - Simplify the caching of utility-registration data. In addition to
749 simplification, avoids spurious test failures when checking for
750 leaks in tests with persistent registries. See `pull 84
751 <https://github.com/zopefoundation/zope.interface/pull/84>`_.
752
753 - Raise ``ValueError`` when non-text names are passed to adapter registry
754 methods: prevents corruption of lookup caches.
755
756 4.4.0 (2017-04-21)
757 ==================
758
759 - Avoid a warning from the C compiler.
760 (https://github.com/zopefoundation/zope.interface/issues/71)
761
762 - Add support for Python 3.6.
763
764 4.3.3 (2016-12-13)
765 ==================
766
767 - Correct typos and ReST formatting errors in documentation.
768
769 - Add API documentation for the adapter registry.
770
771 - Ensure that the ``LICENSE.txt`` file is included in built wheels.
772
773 - Fix C optimizations broken on Py3k. See the Python bug at:
774 http://bugs.python.org/issue15657
775 (https://github.com/zopefoundation/zope.interface/issues/60)
776
777
778 4.3.2 (2016-09-05)
779 ==================
780
781 - Fix equality testing of ``implementedBy`` objects and proxies.
782 (https://github.com/zopefoundation/zope.interface/issues/55)
783
784
785 4.3.1 (2016-08-31)
786 ==================
787
788 - Support Components subclasses that are not hashable.
789 (https://github.com/zopefoundation/zope.interface/issues/53)
790
791
792 4.3.0 (2016-08-31)
793 ==================
794
795 - Add the ability to sort the objects returned by ``implementedBy``.
796 This is compatible with the way interface classes sort so they can
797 be used together in ordered containers like BTrees.
798 (https://github.com/zopefoundation/zope.interface/issues/42)
799
800 - Make ``setuptools`` a hard dependency of ``setup.py``.
801 (https://github.com/zopefoundation/zope.interface/issues/13)
802
803 - Change a linear algorithm (O(n)) in ``Components.registerUtility`` and
804 ``Components.unregisterUtility`` into a dictionary lookup (O(1)) for
805 hashable components. This substantially improves the time taken to
806 manipulate utilities in large registries at the cost of some
807 additional memory usage. (https://github.com/zopefoundation/zope.interface/issues/46)
808
809
810 4.2.0 (2016-06-10)
811 ==================
812
813 - Add support for Python 3.5
814
815 - Drop support for Python 2.6 and 3.2.
816
817
818 4.1.3 (2015-10-05)
819 ==================
820
821 - Fix installation without a C compiler on Python 3.5
822 (https://github.com/zopefoundation/zope.interface/issues/24).
823
824
825 4.1.2 (2014-12-27)
826 ==================
827
828 - Add support for PyPy3.
829
830 - Remove unittest assertions deprecated in Python3.x.
831
832 - Add ``zope.interface.document.asReStructuredText``, which formats the
833 generated text for an interface using ReST double-backtick markers.
834
835
836 4.1.1 (2014-03-19)
837 ==================
838
839 - Add support for Python 3.4.
840
841
842 4.1.0 (2014-02-05)
843 ==================
844
845 - Update ``boostrap.py`` to version 2.2.
846
847 - Add ``@named(name)`` declaration, that specifies the component name, so it
848 does not have to be passed in during registration.
849
850
851 4.0.5 (2013-02-28)
852 ==================
853
854 - Fix a bug where a decorated method caused false positive failures on
855 ``verifyClass()``.
856
857
858 4.0.4 (2013-02-21)
859 ==================
860
861 - Fix a bug that was revealed by porting zope.traversing. During a loop, the
862 loop body modified a weakref dict causing a ``RuntimeError`` error.
863
864 4.0.3 (2012-12-31)
865 ==================
866
867 - Fleshed out PyPI Trove classifiers.
868
869 4.0.2 (2012-11-21)
870 ==================
871
872 - Add support for Python 3.3.
873
874 - Restored ability to install the package in the absence of ``setuptools``.
875
876 - LP #1055223: Fix test which depended on dictionary order and failed randomly
877 in Python 3.3.
878
879 4.0.1 (2012-05-22)
880 ==================
881
882 - Drop explicit ``DeprecationWarnings`` for "class advice" APIS (these
883 APIs are still deprecated under Python 2.x, and still raise an exception
884 under Python 3.x, but no longer cause a warning to be emitted under
885 Python 2.x).
886
887 4.0.0 (2012-05-16)
888 ==================
889
890 - Automated build of Sphinx HTML docs and running doctest snippets via tox.
891
892 - Deprecate the "class advice" APIs from ``zope.interface.declarations``:
893 ``implements``, ``implementsOnly``, and ``classProvides``. In their place,
894 prefer the equivalent class decorators: ``@implementer``,
895 ``@implementer_only``, and ``@provider``. Code which uses the deprecated
896 APIs will not work as expected under Py3k.
897
898 - Remove use of '2to3' and associated fixers when installing under Py3k.
899 The code is now in a "compatible subset" which supports Python 2.6, 2.7,
900 and 3.2, including PyPy 1.8 (the version compatible with the 2.7 language
901 spec).
902
903 - Drop explicit support for Python 2.4 / 2.5 / 3.1.
904
905 - Add support for PyPy.
906
907 - Add support for continuous integration using ``tox`` and ``jenkins``.
908
909 - Add 'setup.py dev' alias (runs ``setup.py develop`` plus installs
910 ``nose`` and ``coverage``).
911
912 - Add 'setup.py docs' alias (installs ``Sphinx`` and dependencies).
913
914 - Replace all unittest coverage previously accomplished via doctests with
915 unittests. The doctests have been moved into a ``docs`` section, managed
916 as a Sphinx collection.
917
918 - LP #910987: Ensure that the semantics of the ``lookup`` method of
919 ``zope.interface.adapter.LookupBase`` are the same in both the C and
920 Python implementations.
921
922 - LP #900906: Avoid exceptions due to tne new ``__qualname__`` attribute
923 added in Python 3.3 (see PEP 3155 for rationale). Thanks to Antoine
924 Pitrou for the patch.
925
926 3.8.0 (2011-09-22)
927 ==================
928
929 - New module ``zope.interface.registry``. This is code moved from
930 ``zope.component.registry`` which implements a basic nonperistent component
931 registry as ``zope.interface.registry.Components``. This class was moved
932 from ``zope.component`` to make porting systems (such as Pyramid) that rely
933 only on a basic component registry to Python 3 possible without needing to
934 port the entirety of the ``zope.component`` package. Backwards
935 compatibility import shims have been left behind in ``zope.component``, so
936 this change will not break any existing code.
937
938 - New ``tests_require`` dependency: ``zope.event`` to test events sent by
939 Components implementation. The ``zope.interface`` package does not have a
940 hard dependency on ``zope.event``, but if ``zope.event`` is importable, it
941 will send component registration events when methods of an instance of
942 ``zope.interface.registry.Components`` are called.
943
944 - New interfaces added to support ``zope.interface.registry.Components``
945 addition: ``ComponentLookupError``, ``Invalid``, ``IObjectEvent``,
946 ``ObjectEvent``, ``IComponentLookup``, ``IRegistration``,
947 ``IUtilityRegistration``, ``IAdapterRegistration``,
948 ``ISubscriptionAdapterRegistration``, ``IHandlerRegistration``,
949 ``IRegistrationEvent``, ``RegistrationEvent``, ``IRegistered``,
950 ``Registered``, ``IUnregistered``, ``Unregistered``,
951 ``IComponentRegistry``, and ``IComponents``.
952
953 - No longer Python 2.4 compatible (tested under 2.5, 2.6, 2.7, and 3.2).
954
955 3.7.0 (2011-08-13)
956 ==================
957
958 - Move changes from 3.6.2 - 3.6.5 to a new 3.7.x release line.
959
960 3.6.7 (2011-08-20)
961 ==================
962
963 - Fix sporadic failures on x86-64 platforms in tests of rich comparisons
964 of interfaces.
965
966 3.6.6 (2011-08-13)
967 ==================
968
969 - LP #570942: Now correctly compare interfaces from different modules but
970 with the same names.
971
972 N.B.: This is a less intrusive / destabilizing fix than the one applied in
973 3.6.3: we only fix the underlying cmp-alike function, rather than adding
974 the other "rich comparison" functions.
975
976 - Revert to software as released with 3.6.1 for "stable" 3.6 release branch.
977
978 3.6.5 (2011-08-11)
979 ==================
980
981 - LP #811792: work around buggy behavior in some subclasses of
982 ``zope.interface.interface.InterfaceClass``, which invoke ``__hash__``
983 before initializing ``__module__`` and ``__name__``. The workaround
984 returns a fixed constant hash in such cases, and issues a ``UserWarning``.
985
986 - LP #804832: Under PyPy, ``zope.interface`` should not build its C
987 extension. Also, prevent attempting to build it under Jython.
988
989 - Add a tox.ini for easier xplatform testing.
990
991 - Fix testing deprecation warnings issued when tested under Py3K.
992
993 3.6.4 (2011-07-04)
994 ==================
995
996 - LP 804951: InterfaceClass instances were unhashable under Python 3.x.
997
998 3.6.3 (2011-05-26)
999 ==================
1000
1001 - LP #570942: Now correctly compare interfaces from different modules but
1002 with the same names.
1003
1004 3.6.2 (2011-05-17)
1005 ==================
1006
1007 - Moved detailed documentation out-of-line from PyPI page, linking instead to
1008 http://docs.zope.org/zope.interface .
1009
1010 - Fixes for small issues when running tests under Python 3.2 using
1011 ``zope.testrunner``.
1012
1013 - LP # 675064: Specify return value type for C optimizations module init
1014 under Python 3: undeclared value caused warnings, and segfaults on some
1015 64 bit architectures.
1016
1017 - setup.py now raises RuntimeError if you don't have Distutils installed when
1018 running under Python 3.
1019
1020 3.6.1 (2010-05-03)
1021 ==================
1022
1023 - A non-ASCII character in the changelog made 3.6.0 uninstallable on
1024 Python 3 systems with another default encoding than UTF-8.
1025
1026 - Fix compiler warnings under GCC 4.3.3.
1027
1028 3.6.0 (2010-04-29)
1029 ==================
1030
1031 - LP #185974: Clear the cache used by ``Specificaton.get`` inside
1032 ``Specification.changed``. Thanks to Jacob Holm for the patch.
1033
1034 - Add support for Python 3.1. Contributors:
1035
1036 Lennart Regebro
1037 Martin v Loewis
1038 Thomas Lotze
1039 Wolfgang Schnerring
1040
1041 The 3.1 support is completely backwards compatible. However, the implements
1042 syntax used under Python 2.X does not work under 3.X, since it depends on
1043 how metaclasses are implemented and this has changed. Instead it now supports
1044 a decorator syntax (also under Python 2.X)::
1045
1046 class Foo:
1047 implements(IFoo)
1048 ...
1049
1050 can now also be written::
1051
1052 @implementer(IFoo):
1053 class Foo:
1054 ...
1055
1056 There are 2to3 fixers available to do this change automatically in the
1057 zope.fixers package.
1058
1059 - Python 2.3 is no longer supported.
1060
1061
1062 3.5.4 (2009-12-23)
1063 ==================
1064
1065 - Use the standard Python doctest module instead of zope.testing.doctest, which
1066 has been deprecated.
1067
1068
1069 3.5.3 (2009-12-08)
1070 ==================
1071
1072 - Fix an edge case: make providedBy() work when a class has '__provides__' in
1073 its __slots__ (see http://thread.gmane.org/gmane.comp.web.zope.devel/22490)
1074
1075
1076 3.5.2 (2009-07-01)
1077 ==================
1078
1079 - BaseAdapterRegistry.unregister, unsubscribe: Remove empty portions of
1080 the data structures when something is removed. This avoids leaving
1081 references to global objects (interfaces) that may be slated for
1082 removal from the calling application.
1083
1084
1085 3.5.1 (2009-03-18)
1086 ==================
1087
1088 - verifyObject: use getattr instead of hasattr to test for object attributes
1089 in order to let exceptions other than AttributeError raised by properties
1090 propagate to the caller
1091
1092 - Add Sphinx-based documentation building to the package buildout
1093 configuration. Use the ``bin/docs`` command after buildout.
1094
1095 - Improve package description a bit. Unify changelog entries formatting.
1096
1097 - Change package's mailing list address to zope-dev at zope.org as
1098 zope3-dev at zope.org is now retired.
1099
1100
1101 3.5.0 (2008-10-26)
1102 ==================
1103
1104 - Fix declaration of _zope_interface_coptimizations, it's not a top level
1105 package.
1106
1107 - Add a DocTestSuite for odd.py module, so their tests are run.
1108
1109 - Allow to bootstrap on Jython.
1110
1111 - Fix https://bugs.launchpad.net/zope3/3.3/+bug/98388: ISpecification
1112 was missing a declaration for __iro__.
1113
1114 - Add optional code optimizations support, which allows the building
1115 of C code optimizations to fail (Jython).
1116
1117 - Replace `_flatten` with a non-recursive implementation, effectively making
1118 it 3x faster.
1119
1120
1121 3.4.1 (2007-10-02)
1122 ==================
1123
1124 - Fix a setup bug that prevented installation from source on systems
1125 without setuptools.
1126
1127
1128 3.4.0 (2007-07-19)
1129 ==================
1130
1131 - Final release for 3.4.0.
1132
1133
1134 3.4.0b3 (2007-05-22)
1135 ====================
1136
1137
1138 - When checking whether an object is already registered, use identity
1139 comparison, to allow adding registering with picky custom comparison methods.
1140
1141
1142 3.3.0.1 (2007-01-03)
1143 ====================
1144
1145 - Made a reference to OverflowWarning, which disappeared in Python
1146 2.5, conditional.
1147
1148
1149 3.3.0 (2007/01/03)
1150 ==================
1151
1152 New Features
1153 ------------
1154
1155 - Refactor the adapter-lookup algorithim to make it much simpler and faster.
1156
1157 Also, implement more of the adapter-lookup logic in C, making
1158 debugging of application code easier, since there is less
1159 infrastructre code to step through.
1160
1161 - Treat objects without interface declarations as if they
1162 declared that they provide ``zope.interface.Interface``.
1163
1164 - Add a number of richer new adapter-registration interfaces
1165 that provide greater control and introspection.
1166
1167 - Add a new interface decorator to zope.interface that allows the
1168 setting of tagged values on an interface at definition time (see
1169 zope.interface.taggedValue).
1170
1171 Bug Fixes
1172 ---------
1173
1174 - A bug in multi-adapter lookup sometimes caused incorrect adapters to
1175 be returned.
1176
1177
1178 3.2.0.2 (2006-04-15)
1179 ====================
1180
1181 - Fix packaging bug: 'package_dir' must be a *relative* path.
1182
1183
1184 3.2.0.1 (2006-04-14)
1185 ====================
1186
1187 - Packaging change: suppress inclusion of 'setup.cfg' in 'sdist' builds.
1188
1189
1190 3.2.0 (2006-01-05)
1191 ==================
1192
1193 - Corresponds to the version of the zope.interface package shipped as part of
1194 the Zope 3.2.0 release.
1195
1196
1197 3.1.0 (2005-10-03)
1198 ==================
1199
1200 - Corresponds to the version of the zope.interface package shipped as part of
1201 the Zope 3.1.0 release.
1202
1203 - Made attribute resolution order consistent with component lookup order,
1204 i.e. new-style class MRO semantics.
1205
1206 - Deprecate 'isImplementedBy' and 'isImplementedByInstancesOf' APIs in
1207 favor of 'implementedBy' and 'providedBy'.
1208
1209
1210 3.0.1 (2005-07-27)
1211 ==================
1212
1213 - Corresponds to the version of the zope.interface package shipped as part of
1214 the Zope X3.0.1 release.
1215
1216 - Fix a bug reported by James Knight, which caused adapter registries
1217 to fail occasionally to reflect declaration changes.
1218
1219
1220 3.0.0 (2004-11-07)
1221 ==================
1222
1223 - Corresponds to the version of the zope.interface package shipped as part of
1224 the Zope X3.0.0 release.