Skip to main content

Interfaces for Python

Project description

zope.interface

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

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.3 (2015-10-05)

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

This version

4.1.3

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.3.tar.gz (141.6 kB view details)

Uploaded Source

Built Distributions

zope.interface-4.1.3.win-amd64-py3.4.exe (361.1 kB view details)

Uploaded Source

zope.interface-4.1.3.win-amd64-py3.3.exe (361.1 kB view details)

Uploaded Source

zope.interface-4.1.3.win-amd64-py3.2.exe (363.1 kB view details)

Uploaded Source

zope.interface-4.1.3.win-amd64-py2.7.exe (362.9 kB view details)

Uploaded Source

zope.interface-4.1.3.win-amd64-py2.6.exe (362.9 kB view details)

Uploaded Source

zope.interface-4.1.3.win32-py3.4.exe (329.3 kB view details)

Uploaded Source

zope.interface-4.1.3.win32-py3.3.exe (329.3 kB view details)

Uploaded Source

zope.interface-4.1.3.win32-py3.2.exe (334.4 kB view details)

Uploaded Source

zope.interface-4.1.3.win32-py2.7.exe (334.6 kB view details)

Uploaded Source

zope.interface-4.1.3.win32-py2.6.exe (334.6 kB view details)

Uploaded Source

zope.interface-4.1.3-py3.4-win-amd64.egg (293.4 kB view details)

Uploaded Egg

zope.interface-4.1.3-py3.4-win32.egg (292.6 kB view details)

Uploaded Egg

zope.interface-4.1.3-py3.3-win-amd64.egg (304.1 kB view details)

Uploaded Egg

zope.interface-4.1.3-py3.3-win32.egg (303.2 kB view details)

Uploaded Egg

zope.interface-4.1.3-py3.2-win-amd64.egg (285.6 kB view details)

Uploaded Egg

zope.interface-4.1.3-py3.2-win32.egg (284.7 kB view details)

Uploaded Egg

zope.interface-4.1.3-py2.7-win-amd64.egg (279.8 kB view details)

Uploaded Egg

zope.interface-4.1.3-py2.7-win32.egg (278.9 kB view details)

Uploaded Egg

zope.interface-4.1.3-py2.6-win-amd64.egg (280.7 kB view details)

Uploaded Egg

zope.interface-4.1.3-py2.6-win32.egg (279.7 kB view details)

Uploaded Egg

File details

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

File metadata

File hashes

Hashes for zope.interface-4.1.3.tar.gz
Algorithm Hash digest
SHA256 2e221a9eec7ccc58889a278ea13dcfed5ef939d80b07819a9a8b3cb1c681484f
MD5 9ae3d24c0c7415deb249dd1a132f0f79
BLAKE2b-256 9d812509ca3c6f59080123c1a8a97125eb48414022618cec0e64eb1313727bfe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zope.interface-4.1.3.win-amd64-py3.4.exe
Algorithm Hash digest
SHA256 202b0ebb6a4142bc7b6ce31d96816cccf391bd48ede9c7b2507503b70d6d0947
MD5 b4461f5816062e93d61c672427bdfaa9
BLAKE2b-256 dab257aecd3750037593e2da00887471d97922d48c1de0aba0dbf14baecd2a1c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zope.interface-4.1.3.win-amd64-py3.3.exe
Algorithm Hash digest
SHA256 4e45d22fb883222a5ab9f282a116fec5ee2e8d1a568ccff6a2d75bbd0eb6bcfc
MD5 b25d10d6656b463f667897ef57ebc360
BLAKE2b-256 a3ddd569204ea462dad8dba27df4c078f2583846b0d1eaf55462838381e90e3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zope.interface-4.1.3.win-amd64-py3.2.exe
Algorithm Hash digest
SHA256 e75a947e15ee97e7e71e02ea302feb2fc62d3a2bb4668bf9dfbed43a506ac7e7
MD5 af8afb802f38c1fce26ee345f1250b15
BLAKE2b-256 7fc691eae46d7a1f1c20b62cfbd7c0a1026ab9ea36fe405c314b8227f77ecb36

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zope.interface-4.1.3.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 d04df8686ec864d0cade8cf199f7f83aecd416109a20834d568f8310ded12dea
MD5 2643a1b25acf6a99e5a0cad91b570cc4
BLAKE2b-256 96bd5f987a5fe3d60109015f788b6aef6c82c0bacd37f17507b3270bcef11125

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zope.interface-4.1.3.win-amd64-py2.6.exe
Algorithm Hash digest
SHA256 69118965410ec86d44dc6b9017ee3ddbd582e0c0abeef62b3a19dbf6c8ad132b
MD5 13c97be75adc6847537d1ff1a7807808
BLAKE2b-256 43324c806681d52bd111c1a963196aba68724709614e76fcdfb17750369eca14

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zope.interface-4.1.3.win32-py3.4.exe
Algorithm Hash digest
SHA256 c544b565858c268e1dab6ce514fbce82962752314bdbc1c1286ca6271c0a2d7a
MD5 9e38ae04bf13ddde89069b32560f6732
BLAKE2b-256 2cdb6137dc15e65d445799116f0f3ada782ff21bc2ddecc65af78c0f849ccbeb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zope.interface-4.1.3.win32-py3.3.exe
Algorithm Hash digest
SHA256 b09c8c1d47b3531c400e0195697f1414a63221de6ef478598a4f1460f7d9a392
MD5 07589b48bab5d83cfa688a51eabe680d
BLAKE2b-256 c54cce68bca7ad23456e9ed01e59bc1a283d6c6e92dbd28e9c615f796e7e4e09

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zope.interface-4.1.3.win32-py3.2.exe
Algorithm Hash digest
SHA256 0d841ba1bb840eea0e6489dc5ecafa6125554971f53b5acb87764441e61bceba
MD5 9667c2ef347d9c175d2745b68c812607
BLAKE2b-256 bec3017c054322dd9fc2b9ccdfc20788e3d8fc9833d457b4f1cbf87451375f0d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zope.interface-4.1.3.win32-py2.7.exe
Algorithm Hash digest
SHA256 928138365245a0e8869a5999fbcc2a45475a0a6ed52a494d60dbdc540335fedd
MD5 e0a5bbc762126157b63d0233e26cc751
BLAKE2b-256 495fed5ea875af4e802198d035efe985d341d9b50edddbc22b785d2ef4b9eb66

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zope.interface-4.1.3.win32-py2.6.exe
Algorithm Hash digest
SHA256 bce9339bb3c7a55e0803b63d21c5839e8e479bc85c4adf42ae415b72f94facb2
MD5 785419efa2d4f8ac16069154789df452
BLAKE2b-256 2fbf1ed6d7f1a13525528e049da5b8b8247b06e4ea92eab12af09af05bae4631

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zope.interface-4.1.3-py3.4-win-amd64.egg
Algorithm Hash digest
SHA256 3b4c394ae3709bfb616cfc72eda547a9b5581296ede34de18c49e0352e84a61f
MD5 42a37091fa3f88eb096b8fea4956ad8a
BLAKE2b-256 a5f111b259eb81020ae0e8d263ee919c611aede172c59e18fb65b906fcdbf589

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zope.interface-4.1.3-py3.4-win32.egg
Algorithm Hash digest
SHA256 c7a42df1ed5a0326b4203e95b2be49f480ca0c3e9ae6999c53e9816eb1587f2c
MD5 f75818eeeb75f251c44a0cc049db6bc4
BLAKE2b-256 1472dc87df9cb24289f98683943981038bfb5f2e9ea19574ab34b80f29b91881

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zope.interface-4.1.3-py3.3-win-amd64.egg
Algorithm Hash digest
SHA256 e8c7b2d40943f71c99148c97f66caa7f5134147f57423f8db5b4825099ce9a09
MD5 10b6821b87e6ec8af4a2ba7bad38b049
BLAKE2b-256 06ed6c41693beee4d7e6ba317a4b19a70e95749df265146b2520789ee9576fea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zope.interface-4.1.3-py3.3-win32.egg
Algorithm Hash digest
SHA256 279024f0208601c3caa907c53876e37ad88625f7eaf1cb3842dbe360b2287017
MD5 f64d8ae0be22982098b844214d64e55c
BLAKE2b-256 9f47835ce38c976e890e1f4aa83bfa16b2d245c2d0c1292911d0c69596d2735d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zope.interface-4.1.3-py3.2-win-amd64.egg
Algorithm Hash digest
SHA256 5fa575a5240f04200c3088427d0d4b7b737f6e9018818a51d8d0f927a6a2517a
MD5 42541d53a40069c010a92078e303295b
BLAKE2b-256 859b809e33bdda34c7197a3d77a65c75275781c0c76e8574edd9cf02661f2b16

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zope.interface-4.1.3-py3.2-win32.egg
Algorithm Hash digest
SHA256 522194ad6a545735edd75c8a83f48d65d1af064e432a7d320d64f56bafc12e99
MD5 aaa5093574f1255c7762c812f4a25aa3
BLAKE2b-256 ef4375063efad542f0b977d8ad439f51d3cfcec3691ca09773ed494a276b94a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zope.interface-4.1.3-py2.7-win-amd64.egg
Algorithm Hash digest
SHA256 6788416f7ea7f5b8a97be94825377aa25e8bdc73463e07baaf9858b29e737077
MD5 5d677d76254269fab715eb3ceaef2efa
BLAKE2b-256 7597d30ebe2f8b36914e3333efffd8320dbf2931a2312ff456d563427392be61

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zope.interface-4.1.3-py2.7-win32.egg
Algorithm Hash digest
SHA256 6f3230f7254518201e5a3708cbb2de98c848304f06e3ded8bfb39e5825cba2e1
MD5 24d0e24e66bf7c813cdbf379febcbd24
BLAKE2b-256 ccf1812bcbc20edddd7b3a6a5eccbf8beb7b7bfdfecd01278536c26f1cf3f1c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zope.interface-4.1.3-py2.6-win-amd64.egg
Algorithm Hash digest
SHA256 f07b631f7a601cd8cbd3332d54f43142c7088a83299f859356f08d1d4d4259b3
MD5 9a77db1252a0efea8d163a62e07ec8e5
BLAKE2b-256 52a5e2dd628aecb86b34e96753eb73de44d5fc23981201f99d087bd293f84f20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zope.interface-4.1.3-py2.6-win32.egg
Algorithm Hash digest
SHA256 de5cca083b9439d8002fb76bbe6b4998c5a5a721fab25b84298967f002df4c94
MD5 02e0c4fea13be62f1c7f37c7742f6bf9
BLAKE2b-256 0b1cedb5ac6890f7b2b997ff1af2a3c72acd511058f52130d02134310406301c

See more details on using hashes here.

Supported by

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