Skip to main content

Interfaces for Python

Project description

zope.interface

https://travis-ci.org/zopefoundation/zope.interface.png?branch=master

This package is intended to be independently reusable in any Python project. It is maintained by the Zope Toolkit project.

This package provides an implementation of “object interfaces” for Python. Interfaces are a mechanism for labeling objects as conforming to a given API or contract. So, this package can be considered as implementation of the Design By Contract methodology support in Python.

For detailed documentation, please see http://docs.zope.org/zope.interface

Changes

4.1.2 (2014-12-27)

  • Add support for PyPy3.

  • Remove unittest assertions deprecated in Python3.x.

  • Add zope.interface.document.asReStructuredText, which formats the generated text for an interface using ReST double-backtick markers.

4.1.1 (2014-03-19)

  • Add support for Python 3.4.

4.1.0 (2014-02-05)

  • Update boostrap.py to version 2.2.

  • Add @named(name) declaration, that specifies the component name, so it does not have to be passed in during registration.

4.0.5 (2013-02-28)

  • Fix a bug where a decorated method caused false positive failures on verifyClass().

4.0.4 (2013-02-21)

  • Fix a bug that was revealed by porting zope.traversing. During a loop, the loop body modified a weakref dict causing a RuntimeError error.

4.0.3 (2012-12-31)

  • Fleshed out PyPI Trove classifiers.

4.0.2 (2012-11-21)

  • Add support for Python 3.3.

  • Restored ability to install the package in the absence of setuptools.

  • LP #1055223: Fix test which depended on dictionary order and failed randomly in Python 3.3.

4.0.1 (2012-05-22)

  • Drop explicit DeprecationWarnings for “class advice” APIS (these APIs are still deprecated under Python 2.x, and still raise an exception under Python 3.x, but no longer cause a warning to be emitted under Python 2.x).

4.0.0 (2012-05-16)

  • Automated build of Sphinx HTML docs and running doctest snippets via tox.

  • Deprecate the “class advice” APIs from zope.interface.declarations: implements, implementsOnly, and classProvides. In their place, prefer the equivalent class decorators: @implementer, @implementer_only, and @provider. Code which uses the deprecated APIs will not work as expected under Py3k.

  • Remove use of ‘2to3’ and associated fixers when installing under Py3k. The code is now in a “compatible subset” which supports Python 2.6, 2.7, and 3.2, including PyPy 1.8 (the version compatible with the 2.7 language spec).

  • Drop explicit support for Python 2.4 / 2.5 / 3.1.

  • Add support for PyPy.

  • Add support for continuous integration using tox and jenkins.

  • Add ‘setup.py dev’ alias (runs setup.py develop plus installs nose and coverage).

  • Add ‘setup.py docs’ alias (installs Sphinx and dependencies).

  • Replace all unittest coverage previously accomplished via doctests with unittests. The doctests have been moved into a docs section, managed as a Sphinx collection.

  • LP #910987: Ensure that the semantics of the lookup method of zope.interface.adapter.LookupBase are the same in both the C and Python implementations.

  • LP #900906: Avoid exceptions due to tne new __qualname__ attribute added in Python 3.3 (see PEP 3155 for rationale). Thanks to Antoine Pitrou for the patch.

3.8.0 (2011-09-22)

  • New module zope.interface.registry. This is code moved from zope.component.registry which implements a basic nonperistent component registry as zope.interface.registry.Components. This class was moved from zope.component to make porting systems (such as Pyramid) that rely only on a basic component registry to Python 3 possible without needing to port the entirety of the zope.component package. Backwards compatibility import shims have been left behind in zope.component, so this change will not break any existing code.

  • New tests_require dependency: zope.event to test events sent by Components implementation. The zope.interface package does not have a hard dependency on zope.event, but if zope.event is importable, it will send component registration events when methods of an instance of zope.interface.registry.Components are called.

  • New interfaces added to support zope.interface.registry.Components addition: ComponentLookupError, Invalid, IObjectEvent, ObjectEvent, IComponentLookup, IRegistration, IUtilityRegistration, IAdapterRegistration, ISubscriptionAdapterRegistration, IHandlerRegistration, IRegistrationEvent, RegistrationEvent, IRegistered, Registered, IUnregistered, Unregistered, IComponentRegistry, and IComponents.

  • No longer Python 2.4 compatible (tested under 2.5, 2.6, 2.7, and 3.2).

3.7.0 (2011-08-13)

  • Move changes from 3.6.2 - 3.6.5 to a new 3.7.x release line.

3.6.7 (2011-08-20)

  • Fix sporadic failures on x86-64 platforms in tests of rich comparisons of interfaces.

3.6.6 (2011-08-13)

  • LP #570942: Now correctly compare interfaces from different modules but with the same names.

    N.B.: This is a less intrusive / destabilizing fix than the one applied in 3.6.3: we only fix the underlying cmp-alike function, rather than adding the other “rich comparison” functions.

  • Revert to software as released with 3.6.1 for “stable” 3.6 release branch.

3.6.5 (2011-08-11)

  • LP #811792: work around buggy behavior in some subclasses of zope.interface.interface.InterfaceClass, which invoke __hash__ before initializing __module__ and __name__. The workaround returns a fixed constant hash in such cases, and issues a UserWarning.

  • LP #804832: Under PyPy, zope.interface should not build its C extension. Also, prevent attempting to build it under Jython.

  • Add a tox.ini for easier xplatform testing.

  • Fix testing deprecation warnings issued when tested under Py3K.

3.6.4 (2011-07-04)

  • LP 804951: InterfaceClass instances were unhashable under Python 3.x.

3.6.3 (2011-05-26)

  • LP #570942: Now correctly compare interfaces from different modules but with the same names.

3.6.2 (2011-05-17)

  • Moved detailed documentation out-of-line from PyPI page, linking instead to http://docs.zope.org/zope.interface .

  • Fixes for small issues when running tests under Python 3.2 using zope.testrunner.

  • LP # 675064: Specify return value type for C optimizations module init under Python 3: undeclared value caused warnings, and segfaults on some 64 bit architectures.

  • setup.py now raises RuntimeError if you don’t have Distutils installed when running under Python 3.

3.6.1 (2010-05-03)

  • A non-ASCII character in the changelog made 3.6.0 uninstallable on Python 3 systems with another default encoding than UTF-8.

  • Fix compiler warnings under GCC 4.3.3.

3.6.0 (2010-04-29)

  • LP #185974: Clear the cache used by Specificaton.get inside Specification.changed. Thanks to Jacob Holm for the patch.

  • Add support for Python 3.1. Contributors:

    Lennart Regebro Martin v Loewis Thomas Lotze Wolfgang Schnerring

    The 3.1 support is completely backwards compatible. However, the implements syntax used under Python 2.X does not work under 3.X, since it depends on how metaclasses are implemented and this has changed. Instead it now supports a decorator syntax (also under Python 2.X):

    class Foo:
        implements(IFoo)
        ...

    can now also be written:

    @implementer(IFoo):
    class Foo:
        ...

    There are 2to3 fixers available to do this change automatically in the zope.fixers package.

  • Python 2.3 is no longer supported.

3.5.4 (2009-12-23)

  • Use the standard Python doctest module instead of zope.testing.doctest, which has been deprecated.

3.5.3 (2009-12-08)

3.5.2 (2009-07-01)

  • BaseAdapterRegistry.unregister, unsubscribe: Remove empty portions of the data structures when something is removed. This avoids leaving references to global objects (interfaces) that may be slated for removal from the calling application.

3.5.1 (2009-03-18)

  • verifyObject: use getattr instead of hasattr to test for object attributes in order to let exceptions other than AttributeError raised by properties propagate to the caller

  • Add Sphinx-based documentation building to the package buildout configuration. Use the bin/docs command after buildout.

  • Improve package description a bit. Unify changelog entries formatting.

  • Change package’s mailing list address to zope-dev at zope.org as zope3-dev at zope.org is now retired.

3.5.0 (2008-10-26)

  • Fix declaration of _zope_interface_coptimizations, it’s not a top level package.

  • Add a DocTestSuite for odd.py module, so their tests are run.

  • Allow to bootstrap on Jython.

  • Fix https://bugs.launchpad.net/zope3/3.3/+bug/98388: ISpecification was missing a declaration for __iro__.

  • Add optional code optimizations support, which allows the building of C code optimizations to fail (Jython).

  • Replace _flatten with a non-recursive implementation, effectively making it 3x faster.

3.4.1 (2007-10-02)

  • Fix a setup bug that prevented installation from source on systems without setuptools.

3.4.0 (2007-07-19)

  • Final release for 3.4.0.

3.4.0b3 (2007-05-22)

  • When checking whether an object is already registered, use identity comparison, to allow adding registering with picky custom comparison methods.

3.3.0.1 (2007-01-03)

  • Made a reference to OverflowWarning, which disappeared in Python 2.5, conditional.

3.3.0 (2007/01/03)

New Features

  • Refactor the adapter-lookup algorithim to make it much simpler and faster.

    Also, implement more of the adapter-lookup logic in C, making debugging of application code easier, since there is less infrastructre code to step through.

  • Treat objects without interface declarations as if they declared that they provide zope.interface.Interface.

  • Add a number of richer new adapter-registration interfaces that provide greater control and introspection.

  • Add a new interface decorator to zope.interface that allows the setting of tagged values on an interface at definition time (see zope.interface.taggedValue).

Bug Fixes

  • A bug in multi-adapter lookup sometimes caused incorrect adapters to be returned.

3.2.0.2 (2006-04-15)

  • Fix packaging bug: ‘package_dir’ must be a relative path.

3.2.0.1 (2006-04-14)

  • Packaging change: suppress inclusion of ‘setup.cfg’ in ‘sdist’ builds.

3.2.0 (2006-01-05)

  • Corresponds to the verison of the zope.interface package shipped as part of the Zope 3.2.0 release.

3.1.0 (2005-10-03)

  • Corresponds to the verison of the zope.interface package shipped as part of the Zope 3.1.0 release.

  • Made attribute resolution order consistent with component lookup order, i.e. new-style class MRO semantics.

  • Deprecate ‘isImplementedBy’ and ‘isImplementedByInstancesOf’ APIs in favor of ‘implementedBy’ and ‘providedBy’.

3.0.1 (2005-07-27)

  • Corresponds to the verison of the zope.interface package shipped as part of the Zope X3.0.1 release.

  • Fix a bug reported by James Knight, which caused adapter registries to fail occasionally to reflect declaration changes.

3.0.0 (2004-11-07)

  • Corresponds to the verison of the zope.interface package shipped as part of the Zope X3.0.0 release.

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zope.interface-4.1.2.tar.gz (919.3 kB view details)

Uploaded Source

Built Distributions

zope.interface-4.1.2.win-amd64-py3.4.exe (360.4 kB view details)

Uploaded Source

zope.interface-4.1.2.win-amd64-py3.3.exe (360.4 kB view details)

Uploaded Source

zope.interface-4.1.2.win-amd64-py3.2.exe (362.4 kB view details)

Uploaded Source

zope.interface-4.1.2.win-amd64-py2.7.exe (362.2 kB view details)

Uploaded Source

zope.interface-4.1.2.win-amd64-py2.6.exe (362.2 kB view details)

Uploaded Source

zope.interface-4.1.2.win32-py3.4.exe (328.5 kB view details)

Uploaded Source

zope.interface-4.1.2.win32-py3.3.exe (328.5 kB view details)

Uploaded Source

zope.interface-4.1.2.win32-py3.2.exe (333.7 kB view details)

Uploaded Source

zope.interface-4.1.2.win32-py2.7.exe (333.9 kB view details)

Uploaded Source

zope.interface-4.1.2.win32-py2.6.exe (333.9 kB view details)

Uploaded Source

zope.interface-4.1.2-py3.4-win-amd64.egg (293.2 kB view details)

Uploaded Egg

zope.interface-4.1.2-py3.4-win32.egg (292.4 kB view details)

Uploaded Egg

zope.interface-4.1.2-py3.3-win-amd64.egg (304.0 kB view details)

Uploaded Egg

zope.interface-4.1.2-py3.3-win32.egg (303.1 kB view details)

Uploaded Egg

zope.interface-4.1.2-py3.2-win-amd64.egg (285.5 kB view details)

Uploaded Egg

zope.interface-4.1.2-py3.2-win32.egg (284.5 kB view details)

Uploaded Egg

zope.interface-4.1.2-py2.7-win-amd64.egg (279.7 kB view details)

Uploaded Egg

zope.interface-4.1.2-py2.7-win32.egg (278.7 kB view details)

Uploaded Egg

zope.interface-4.1.2-py2.6-win-amd64.egg (280.6 kB view details)

Uploaded Egg

zope.interface-4.1.2-py2.6-win32.egg (279.6 kB view details)

Uploaded Egg

File details

Details for the file zope.interface-4.1.2.tar.gz.

File metadata

File hashes

Hashes for zope.interface-4.1.2.tar.gz
Algorithm Hash digest
SHA256 441fefcac1fbac57c55239452557d3598571ab82395198b2565a29d45d1232f6
MD5 04298faeaa70b4f3b23fa2ae8987262c
BLAKE2b-256 2904ed171a21850aa1ff9b683b061f1168b3dc6461c6c7c4550b238e97fef197

See more details on using hashes here.

File details

Details for the file zope.interface-4.1.2.win-amd64-py3.4.exe.

File metadata

File hashes

Hashes for zope.interface-4.1.2.win-amd64-py3.4.exe
Algorithm Hash digest
SHA256 7832626d5686e911d54b71159a8aedd0d9e8f326ef35f187da618b8f224623af
MD5 ee356dd4579369c5fa0830667dadc655
BLAKE2b-256 0c9167f5cf8b70b1801a62829d77c67cc9b03b8f6f6498840c1f6cc9ad906b9d

See more details on using hashes here.

File details

Details for the file zope.interface-4.1.2.win-amd64-py3.3.exe.

File metadata

File hashes

Hashes for zope.interface-4.1.2.win-amd64-py3.3.exe
Algorithm Hash digest
SHA256 4716f41ef642974ed18b2b75e0fbcf5d2fb0c472115ec58c228094161a2d3477
MD5 ef3a66fe625812263de5bb90a7a491ab
BLAKE2b-256 2a885b5e3da5b1c2ef648e0d60d3474b49c657671856516ba41206b741a277ff

See more details on using hashes here.

File details

Details for the file zope.interface-4.1.2.win-amd64-py3.2.exe.

File metadata

File hashes

Hashes for zope.interface-4.1.2.win-amd64-py3.2.exe
Algorithm Hash digest
SHA256 fb44456a15b8cbdb69caae711bf157ce8b7b90d597cd5dba39d2392fedcc7b68
MD5 3926f1c12c319c630bb52b2fe0ecffbc
BLAKE2b-256 6377772b7c94285d65d55cdec5bb3348af65d432d9493d59aa003911df278834

See more details on using hashes here.

File details

Details for the file zope.interface-4.1.2.win-amd64-py2.7.exe.

File metadata

File hashes

Hashes for zope.interface-4.1.2.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 35767093a87274d2802f6945658851edfeb6d6a27535aa0eaa9c1e1a4f3419c4
MD5 c5b6cbcbabb02249531a35a2979d58c9
BLAKE2b-256 2e81b607208b53b9ec935ace2d3fb61987535840ed139552efa51ea9e2ac9cce

See more details on using hashes here.

File details

Details for the file zope.interface-4.1.2.win-amd64-py2.6.exe.

File metadata

File hashes

Hashes for zope.interface-4.1.2.win-amd64-py2.6.exe
Algorithm Hash digest
SHA256 d89193d72183a41a81309fe9302f693c7731d3e06b8540b9fda5208673bd725d
MD5 7dd46696e2cbedda9d81825ad45b2ee0
BLAKE2b-256 cbd0b01ec2366c346ff6857afac27a2a642c3ddd4aae4ba1edfe9db929870d6c

See more details on using hashes here.

File details

Details for the file zope.interface-4.1.2.win32-py3.4.exe.

File metadata

File hashes

Hashes for zope.interface-4.1.2.win32-py3.4.exe
Algorithm Hash digest
SHA256 8b0a4a69be86f680310c641b4b1275fb9ef85b919c43056914f267a771c56585
MD5 d2bcd4de6b76be753cd139fd4bcd8c79
BLAKE2b-256 2eb890331c6b4b7ba414b385f364eed081186092dbfd935a96040c2372338b86

See more details on using hashes here.

File details

Details for the file zope.interface-4.1.2.win32-py3.3.exe.

File metadata

File hashes

Hashes for zope.interface-4.1.2.win32-py3.3.exe
Algorithm Hash digest
SHA256 07bab90ce1a7fa6860bc73c297c18da48d2bfb4d7c4ce135eb464353a452eeb3
MD5 9b736e4ea6275966014b1232ca8facf2
BLAKE2b-256 626592fcfdc11bf1b4810d97aa461a3b92e458aac6dacba3adc65cbbbffe72ab

See more details on using hashes here.

File details

Details for the file zope.interface-4.1.2.win32-py3.2.exe.

File metadata

File hashes

Hashes for zope.interface-4.1.2.win32-py3.2.exe
Algorithm Hash digest
SHA256 e361ed12103f2dd88e3c58410e11bec044a770cff2cf214664bac4bb5cb92510
MD5 4b0831a33c8566342ea2057c46e10d63
BLAKE2b-256 777329804489b671b4abf4523956c0755d15dd7172f8a7e905456393116d7e77

See more details on using hashes here.

File details

Details for the file zope.interface-4.1.2.win32-py2.7.exe.

File metadata

File hashes

Hashes for zope.interface-4.1.2.win32-py2.7.exe
Algorithm Hash digest
SHA256 16647fb85228295eed4711bca7fa517dce0f9545cee94a2bfa4ff2d3e37b1f71
MD5 ab9396981638835220fc78209bd2d803
BLAKE2b-256 e1ff1e2b25002537baa800b49a90905e0e3733ff0edae46f5b5eee85fa79677e

See more details on using hashes here.

File details

Details for the file zope.interface-4.1.2.win32-py2.6.exe.

File metadata

File hashes

Hashes for zope.interface-4.1.2.win32-py2.6.exe
Algorithm Hash digest
SHA256 5182b2d8964253b74fec3093bc86cc4f655e66a92e025582990d7c46ad1674d4
MD5 f2043bb45499d3c9d8c115cf96c0d5ae
BLAKE2b-256 52eee2f43d6cc7d66e8285a6c894ecf5ec04eddd919d8e1a8d2e0ed2093ef9a6

See more details on using hashes here.

File details

Details for the file zope.interface-4.1.2-py3.4-win-amd64.egg.

File metadata

File hashes

Hashes for zope.interface-4.1.2-py3.4-win-amd64.egg
Algorithm Hash digest
SHA256 3be4c85bdb4096c108e8e6a1249675d75b707f6a5c7915eb0c47f22c910c2eb7
MD5 cbe12f0884d307e408967eb31fcc625e
BLAKE2b-256 c33e7d332a436b0b2aed9d94d36393e4de3c6cfa1d51a3b1c05bc23f0f5a98ad

See more details on using hashes here.

File details

Details for the file zope.interface-4.1.2-py3.4-win32.egg.

File metadata

File hashes

Hashes for zope.interface-4.1.2-py3.4-win32.egg
Algorithm Hash digest
SHA256 2dffdfd31bb8d8835292a54d068dec9ed1d663a0709f5e24e8b96881c744c0d9
MD5 9bd4e9e5a02fcb84da2e8fc2995e317b
BLAKE2b-256 f5497b0b2b4a056456ae337f4cc75d4bf04817b4dc6522532e566594ddc6621f

See more details on using hashes here.

File details

Details for the file zope.interface-4.1.2-py3.3-win-amd64.egg.

File metadata

File hashes

Hashes for zope.interface-4.1.2-py3.3-win-amd64.egg
Algorithm Hash digest
SHA256 7100cdfc516b3014b6fb7452cb77909a22c3d862a8a35a868b711b1327671fdf
MD5 4a1ec6735a3d71f62fa0b7ec21e75c67
BLAKE2b-256 662de892b5f2b0c37f3736969e8b5365c9c9c57a0c481a36b2552574c198b5b8

See more details on using hashes here.

File details

Details for the file zope.interface-4.1.2-py3.3-win32.egg.

File metadata

File hashes

Hashes for zope.interface-4.1.2-py3.3-win32.egg
Algorithm Hash digest
SHA256 9f3a6de2e4b221f45ce5236434d884364aa12419cdf16d4d84d14d04fdcd362b
MD5 ee25080d5dea361ea9685472464446ef
BLAKE2b-256 badb4e5d18eee6b0bf6e167ea1f1194e5031f8de6b936704056200fee8bf62b6

See more details on using hashes here.

File details

Details for the file zope.interface-4.1.2-py3.2-win-amd64.egg.

File metadata

File hashes

Hashes for zope.interface-4.1.2-py3.2-win-amd64.egg
Algorithm Hash digest
SHA256 8f185c199b38f643649c2263ff9a72c68cf01fc3f07412b4e935d33fe8f38c2b
MD5 43338fcf26c86319da71882733d48bdd
BLAKE2b-256 4ca0ff7061395db9b96cd731c96c961786aac08be0a24c832d14282eba163f62

See more details on using hashes here.

File details

Details for the file zope.interface-4.1.2-py3.2-win32.egg.

File metadata

File hashes

Hashes for zope.interface-4.1.2-py3.2-win32.egg
Algorithm Hash digest
SHA256 8d4007eff6648f03aa8c88af7fc485becf223649aaf29d2d9b561f2b528be6b4
MD5 c5a1b41d77e1c5d2edb79580dd14bd90
BLAKE2b-256 177aa8497ff11fe34772fe635048889c962ecf0b4cbfc8d5baab9a45aa60e10a

See more details on using hashes here.

File details

Details for the file zope.interface-4.1.2-py2.7-win-amd64.egg.

File metadata

File hashes

Hashes for zope.interface-4.1.2-py2.7-win-amd64.egg
Algorithm Hash digest
SHA256 7a4e61c7031fb3a538b45c66ce80ceaa275cc190819758f3c26792148d0f76bd
MD5 df55f6f705a080480cdf8e0ab5fc91b7
BLAKE2b-256 e905060523bee4a81c7e6f8c2a1b8d81ed9f32c00d619bb343cffcd67ea989c1

See more details on using hashes here.

File details

Details for the file zope.interface-4.1.2-py2.7-win32.egg.

File metadata

File hashes

Hashes for zope.interface-4.1.2-py2.7-win32.egg
Algorithm Hash digest
SHA256 c6d3efbe840e989900307ed1cd2d06b1150a02a0bd88c8a01ad13ebeedb163a1
MD5 fb87cff4eb7407af290a78ff628f7063
BLAKE2b-256 05659ef924cfd4edda78666760127a90a94bc34a2bba135112cadd0ecfbaf2ba

See more details on using hashes here.

File details

Details for the file zope.interface-4.1.2-py2.6-win-amd64.egg.

File metadata

File hashes

Hashes for zope.interface-4.1.2-py2.6-win-amd64.egg
Algorithm Hash digest
SHA256 f644ddf03ae8766efe0bda51b505e6abd960023bd8a8a7a9669b126d66cca5c8
MD5 d89cf56266f3899e7bedf6dccdcfd937
BLAKE2b-256 a1c8539ab9716fd06c7822f6486bf9d401d8000d0c1c6536c4d929937ea38bdf

See more details on using hashes here.

File details

Details for the file zope.interface-4.1.2-py2.6-win32.egg.

File metadata

File hashes

Hashes for zope.interface-4.1.2-py2.6-win32.egg
Algorithm Hash digest
SHA256 6880757023e844a612c6def027db691992bef0fae8966185b9e8473b1163e7a1
MD5 6fb2c2cf7f8b39a0e6bf064985b64180
BLAKE2b-256 0e44a3a7aced59ec373e7bdd6da2b232e6c59c35975bcbc85f25c3fb0e852fdc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page