4 Summary: Interfaces for Python
5 Home-page: http://pypi.python.org/pypi/zope.interface
6 Author: Zope Foundation and Contributors
7 Author-email: zope-dev@zope.org
9 Description: ``zope.interface`` README
10 =========================
12 This package is intended to be independently reusable in any Python
13 project. It is maintained by the `Zope Toolkit project
14 <http://docs.zope.org/zopetoolkit/>`_.
16 This package provides an implementation of "object interfaces" for Python.
17 Interfaces are a mechanism for labeling objects as conforming to a given
18 API or contract. So, this package can be considered as implementation of
19 the `Design By Contract`_ methodology support in Python.
21 .. _Design By Contract: http://en.wikipedia.org/wiki/Design_by_contract
23 For detailed documentation, please see http://docs.zope.org/zope.interface
25 ``zope.interface Changelog``
26 ============================
31 - New module ``zope.interface.registry``. This is code moved from
32 ``zope.component.registry`` which implements a basic nonperistent component
33 registry as ``zope.interface.registry.Components``. This class was moved
34 from ``zope.component`` to make porting systems (such as Pyramid) that rely
35 only on a basic component registry to Python 3 possible without needing to
36 port the entirety of the ``zope.component`` package. Backwards
37 compatibility import shims have been left behind in ``zope.component``, so
38 this change will not break any existing code.
40 - New ``tests_require`` dependency: ``zope.event`` to test events sent by
41 Components implementation. The ``zope.interface`` package does not have a
42 hard dependency on ``zope.event``, but if ``zope.event`` is importable, it
43 will send component registration events when methods of an instance of
44 ``zope.interface.registry.Components`` are called.
46 - New interfaces added to support ``zope.interface.registry.Components``
47 addition: ``ComponentLookupError``, ``Invalid``, ``IObjectEvent``,
48 ``ObjectEvent``, ``IComponentLookup``, ``IRegistration``,
49 ``IUtilityRegistration``, ``IAdapterRegistration``,
50 ``ISubscriptionAdapterRegistration``, ``IHandlerRegistration``,
51 ``IRegistrationEvent``, ``RegistrationEvent``, ``IRegistered``,
52 ``Registered``, ``IUnregistered``, ``Unregistered``,
53 ``IComponentRegistry``, and ``IComponents``.
55 - No longer Python 2.4 compatible (tested under 2.5, 2.6, 2.7, and 3.2).
60 - Move changes from 3.6.2 - 3.6.5 to a new 3.7.x release line.
65 - Fix sporadic failures on x86-64 platforms in tests of rich comparisons
71 - LP #570942: Now correctly compare interfaces from different modules but
74 N.B.: This is a less intrusive / destabilizing fix than the one applied in
75 3.6.3: we only fix the underlying cmp-alike function, rather than adding
76 the other "rich comparison" functions.
78 - Revert to software as released with 3.6.1 for "stable" 3.6 release branch.
83 - LP #811792: work around buggy behavior in some subclasses of
84 ``zope.interface.interface.InterfaceClass``, which invoke ``__hash__``
85 before initializing ``__module__`` and ``__name__``. The workaround
86 returns a fixed constant hash in such cases, and issues a ``UserWarning``.
88 - LP #804832: Under PyPy, ``zope.interface`` should not build its C
89 extension. Also, prevent attempting to build it under Jython.
91 - Add a tox.ini for easier xplatform testing.
93 - Fix testing deprecation warnings issued when tested under Py3K.
98 - LP 804951: InterfaceClass instances were unhashable under Python 3.x.
103 - LP #570942: Now correctly compare interfaces from different modules but
109 - Moved detailed documentation out-of-line from PyPI page, linking instead to
110 http://docs.zope.org/zope.interface .
112 - Fixes for small issues when running tests under Python 3.2 using
115 - LP # 675064: Specify return value type for C optimizations module init
116 under Python 3: undeclared value caused warnings, and segfaults on some
117 64 bit architectures.
119 - setup.py now raises RuntimeError if you don't have Distutils installed when
120 running under Python 3.
125 - A non-ASCII character in the changelog made 3.6.0 uninstallable on
126 Python 3 systems with another default encoding than UTF-8.
128 - Fixed compiler warnings under GCC 4.3.3.
133 - LP #185974: Clear the cache used by ``Specificaton.get`` inside
134 ``Specification.changed``. Thanks to Jacob Holm for the patch.
136 - Added support for Python 3.1. Contributors:
143 The 3.1 support is completely backwards compatible. However, the implements
144 syntax used under Python 2.X does not work under 3.X, since it depends on
145 how metaclasses are implemented and this has changed. Instead it now supports
146 a decorator syntax (also under Python 2.X)::
152 can now also be written::
158 There are 2to3 fixers available to do this change automatically in the
161 - Python 2.3 is no longer supported.
167 - Use the standard Python doctest module instead of zope.testing.doctest, which
174 - Fix an edge case: make providedBy() work when a class has '__provides__' in
175 its __slots__ (see http://thread.gmane.org/gmane.comp.web.zope.devel/22490)
181 - BaseAdapterRegistry.unregister, unsubscribe: Remove empty portions of
182 the data structures when something is removed. This avoids leaving
183 references to global objects (interfaces) that may be slated for
184 removal from the calling application.
190 - verifyObject: use getattr instead of hasattr to test for object attributes
191 in order to let exceptions other than AttributeError raised by properties
192 propagate to the caller
194 - Add Sphinx-based documentation building to the package buildout
195 configuration. Use the ``bin/docs`` command after buildout.
197 - Improve package description a bit. Unify changelog entries formatting.
199 - Change package's mailing list address to zope-dev at zope.org as
200 zope3-dev at zope.org is now retired.
206 - Fixed declaration of _zope_interface_coptimizations, it's not a top level
209 - Add a DocTestSuite for odd.py module, so their tests are run.
211 - Allow to bootstrap on Jython.
213 - Fix https://bugs.launchpad.net/zope3/3.3/+bug/98388: ISpecification
214 was missing a declaration for __iro__.
216 - Added optional code optimizations support, which allows the building
217 of C code optimizations to fail (Jython).
219 - Replaced `_flatten` with a non-recursive implementation, effectively making
226 - Fixed a setup bug that prevented installation from source on systems
233 - Final release for 3.4.0.
240 - Objects with picky custom comparison methods couldn't be added to
241 component registries. Now, when checking whether an object is
242 already registered, identity comparison is used.
248 - Made a reference to OverflowWarning, which disappeared in Python
258 - The adapter-lookup algorithim was refactored to make it
259 much simpler and faster.
261 Also, more of the adapter-lookup logic is implemented in C, making
262 debugging of application code easier, since there is less
263 infrastructre code to step through.
265 - We now treat objects without interface declarations as if they
266 declared that they provide zope.interface.Interface.
268 - There are a number of richer new adapter-registration interfaces
269 that provide greater control and introspection.
271 - Added a new interface decorator to zope.interface that allows the
272 setting of tagged values on an interface at definition time (see
273 zope.interface.taggedValue).
278 - A bug in multi-adapter lookup sometimes caused incorrect adapters to
285 - Fix packaging bug: 'package_dir' must be a *relative* path.
291 - Packaging change: suppress inclusion of 'setup.cfg' in 'sdist' builds.
297 - Corresponds to the verison of the zope.interface package shipped as part of
298 the Zope 3.2.0 release.
304 - Corresponds to the verison of the zope.interface package shipped as part of
305 the Zope 3.1.0 release.
307 - Made attribute resolution order consistent with component lookup order,
308 i.e. new-style class MRO semantics.
310 - Deprecated 'isImplementedBy' and 'isImplementedByInstancesOf' APIs in
311 favor of 'implementedBy' and 'providedBy'.
317 - Corresponds to the verison of the zope.interface package shipped as part of
318 the Zope X3.0.1 release.
320 - Fixed a bug reported by James Knight, which caused adapter registries
321 to fail occasionally to reflect declaration changes.
327 - Corresponds to the verison of the zope.interface package shipped as part of
328 the Zope X3.0.0 release.
331 Classifier: Development Status :: 5 - Production/Stable
332 Classifier: Intended Audience :: Developers
333 Classifier: License :: OSI Approved :: Zope Public License
334 Classifier: Operating System :: OS Independent
335 Classifier: Programming Language :: Python :: 2.4
336 Classifier: Programming Language :: Python :: 2.5
337 Classifier: Programming Language :: Python :: 2.6
338 Classifier: Programming Language :: Python :: 2.7
339 Classifier: Programming Language :: Python :: 3
340 Classifier: Programming Language :: Python :: 3.1
341 Classifier: Programming Language :: Python :: 3.2
342 Classifier: Topic :: Software Development :: Libraries :: Python Modules