| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |\
| |
| | |
Fix repr of "Attribute" to look like before
|
| | |
| |
| |
| | |
and as usual in Python.
|
| |\ \
| |/
|/| |
Add test case for #6.
|
| |/
|
|
| |
It seems to be working now, so this fixes #6
|
| |\
| |
| | |
Make verifyObject/Class collect and raise all errors instead of only the first
|
| | | |
|
| | |
| |
| |
| | |
See https://github.com/zopefoundation/zope.interface/pull/174#issuecomment-584154877
|
| | |
| |
| |
| |
| |
| | |
As per review.
Also include the actual failing implementation object in the BrokenMethodImplementation to make it easier to track down what's going on when inheritance is involved.
|
| |/
|
|
| |
Fixes #171.
|
| |\
| |
| | |
Make verification errors more readable and useful.
|
| | |
| |
| |
| | |
Also tweak documentation to DRY for verifyObject/verifyClass.
|
| | | |
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Eliminate the trailing newlines and blank spaces (the code called them
"a stupid artifact").
Include the name of the defining interface (so the user can easily look up
any requirements on the attribute) and, for methods, the expected
signature (no more guessing about how many arguments are required!).
This is implemented by giving Attribute and Method useful reprs and strs.
Previously, they just had the defaults.
Fixes #170
|
| |\
| |
| | |
Fix verification for methods of builtin types with pseudo-default args on PyPy
|
| |/
|
|
|
|
|
|
|
| |
on Pypy
On PyPy2, they are ignored (like on CPython), but on PyPy3 they can
actually be validated.
Fixes #118
|
| |\
| |
| | |
Add __all__ to all modules.
|
| | | |
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #153
The items that went in each ``__all__`` are based on what is
documented:
$ rg --no-filename 'import' docs/ -trst | tr -s "[:blank:]" | sort | uniq | grep zope
>>> from pprint import pprint
>>> from zope.interface import *
>>> from zope.interface import Interface
>>> from zope.interface import Interface, Attribute, implementer
>>> from zope.interface import alsoProvides
>>> from zope.interface import classImplements
>>> from zope.interface import classImplementsOnly
>>> from zope.interface import directlyProvidedBy
>>> from zope.interface import directlyProvides
>>> from zope.interface import implementedBy
>>> from zope.interface import implementer
>>> from zope.interface import implementer_only
>>> from zope.interface import noLongerProvides
>>> from zope.interface import providedBy
>>> from zope.interface import provider
>>> from zope.interface.adapter import AdapterRegistry
>>> from zope.interface.declarations import Declaration
>>> from zope.interface.declarations import InstanceDeclarations
>>> from zope.interface.declarations import ProvidesClass
>>> from zope.interface.declarations import named
>>> from zope.interface.exceptions import BrokenImplementation
>>> from zope.interface.exceptions import Invalid
>>> from zope.interface.interface import Specification
>>> from zope.interface.interface import adapter_hooks
>>> from zope.interface.verify import verifyObject
>>> import gc
>>> import zope.interface
And also some personal judgement about what the public API is that I'm
more than happy to have reviewed.
|
| |\
| |
| | |
Performance optimization in _lookup _lookupAll and _subscriptions
|
| | | |
|
| |/ |
|
| |\
| |
| | |
The _empty singleton has no-op subscribe/unsubscribe methods.
|
| |/
|
|
|
|
|
|
| |
Turns out they can be called in some very strange error cases. See #162 and #163 for details.
This should fix #162 (at least the provided test case, five.intid, passes now).
It also does enough work on #163 that (a) the test can be written and run in pure-python mode, which was needed to debug it and (b) five.intid runs in pure-python mode (well, with a bunch of other small hacks to Acquisition, ExtensionClass, DocumentTemplate and AccessControl), but I won't claim that it fully fixes #163. For one thing, there are no specific tests. For another, I see more such differences.
|
| |\
| |
| | |
Remove unneeded overwrite and call to anyway inherited __hash__ method
|
| | | |
|
| |/ |
|
| |\
| |
| | |
Make the singleton _empty immutable.
|
| | | |
|
| |/
|
|
| |
Fixes #158
|
| |\
| |
| | |
Remove support for hashing uninitialized interfaces.
|
| |/
|
|
| |
Fixes #157
|
| |\
| |
| | |
More memory optimizations for a 6-7% reduction.
|
| | | |
|
| | |
| |
| |
| | |
another few percent.
|
| | |
| |
| |
| |
| |
| | |
example), so avoid allocating a WeakKeyDictionary until needed.
This saves another 2% or so.
|
| |/
|
|
| |
In a test of 6000 modules that load 2245 InterfaceClass objects and produce 2233 ClassProvides instances, this saves about 1% total memory usage in Python 2.7.
|
| |\
| |
| | |
Improve InterfaceClass __hash__ performance
|
| | | |
|
| |/ |
|
| | |
|
| |\
| |
| | |
Use tp_members in SpecificationBase and ClassProvidesBase; stop using private undoc API
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of storing 1 and 2 attributes, respectively, in __dict__. This lets us eliminate inst_attr and its use of an undocumented API.
It also helps reign in the size of these objects. Before, on CPython 8, a ClassProvides object that subclasses both SpecificationBase and ClassProvidesBase required 408 bytes: 48 for the object, 360 for the dict.
Now it requires 72 + 232 = 304.
With a bit of work on defining __slots__ in Python, that can be brought much lower still, I think.
zope.security tests pass with this installed.
|
| |\ \
| |/
| | |
Remove checking of PURE_PYTHON at build time
|
| | |
| |
| |
| | |
Also add a line of missing whitespace.
|
| | |
| |
| |
| | |
And tox. It wasn't properly working to report coverage before.
|
| | |
| |
| |
| |
| |
| |
| | |
Turns out that the C extensions build and work fine with PyPy, but don't use them by default. Let them
be forced, though.
Tests needed some refactoring to account for the various permutations.
|
| | | |
|
| | | |
|
| | | |
|