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