| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
redundancy detection for the sake of plone.app.caching.
|
| |
|
|
| |
classImplementsOnly and @implementer_only can still be used to do that.
|
| |
|
|
| |
the precedence of __conform__ vs __adapt__.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cooperate with InterfaceClass to ensure there is no performance penalty for this. Fixes #3
+-------------------------------------------------------------+----------------+------------------------------+------------------------------+
| Benchmark | bench_master38 | bench_issue3 | bench_issue3_opt |
+=============================================================+================+==============================+==============================+
| call interface (provides; deep) | 369 ns | 454 ns: 1.23x slower (+23%) | not significant |
+-------------------------------------------------------------+----------------+------------------------------+------------------------------+
| call interface (provides; wide) | 373 ns | 457 ns: 1.22x slower (+22%) | 365 ns: 1.02x faster (-2%) |
+-------------------------------------------------------------+----------------+------------------------------+------------------------------+
| call interface (no alternate, no conform, not provided) | 671 ns | 760 ns: 1.13x slower (+13%) | 636 ns: 1.06x faster (-5%) |
+-------------------------------------------------------------+----------------+------------------------------+------------------------------+
| call interface (alternate, no conform, not provided) | 395 ns | 494 ns: 1.25x slower (+25%) | not significant |
+-------------------------------------------------------------+----------------+------------------------------+------------------------------+
| call interface (no alternate, valid conform, not provided) | 250 ns | not significant | 227 ns: 1.10x faster (-9%) |
+-------------------------------------------------------------+----------------+------------------------------+------------------------------+
| call interface (alternate, invalid conform, not provided) | 348 ns | 424 ns: 1.22x slower (+22%) | not significant |
+-------------------------------------------------------------+----------------+------------------------------+------------------------------+
|
| | |
|
| |
|
|
| |
duplicates in the index.
|
| |
|
|
|
|
| |
None of the elegant solutions mentioned in the issue worked out, so I had to brute force it.
Fixes #8
|
| |\
| |
| | |
Documentation clarifications.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
- docs/adapter.rst
Subscriptions are returned from least to most specific, not the other way around; the docs were incorrect.
Add additional examples, and use more verbose names in current examples, to clarify this. Fixes #136.
- interfaces.py
names() and namesAndDescriptions() just return a collection, not a sequence. Fixes #134.
|
| | |
| |
| |
| | |
Mostly formatting. Some interfaces were being documented as clasess, which doesn't work.
|
| |/
|
|
|
|
|
|
| |
Previously it manually walked up __bases__, meaning the answers could be inconsistent.
Fixes #190.
Also fixes several minor issues in the documentation, mostly cross-reference related.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #21
The 'mostly' is because interfaces are used in cases that C3 forbids;
when there's a conflict, we fallback to the legacy algorithm. It turns
out there are few conflicts (13K out of 149K total orderings in Plone).
I hoped the fix for #8 might shake out automatically, but it didn't.
Optimize the extremely common case of a __bases__ of length one.
In the benchmark, 4/5 of the interfaces and related objects have a base of length one.
Fix the bad IROs in the bundled ABC interfaces, and implement a way to get warnings or errors.
In running plone/buildout.coredev and tracking the RO requests, the
stats for equal, not equal, and inconsistent-so-fallback, I got
{'ros': 148868, 'eq': 138461, 'ne': 10407, 'inconsistent': 12934}
Add the interface module to the Attribute str.
This was extremely helpful tracking down the Plone problem; IDate is defined in multiple modules.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The query functions now start by looking at the next class in the MRO (interfaces directly provided by the underlying object are not found).
Adapter registries automatically pick up providedBy change to start finding the correct implementations of adapters, but to make that really useful they needed to change to unpack super() arguments and pass __self__ to the factory.
Fixes #11
Unfortunately, this makes PyPy unable to build the C extensions.
Additional crash-safety for adapter lookup.
Make the C functions get the cache only after resolving the
``required`` into a tuple, in case of side-effects like...clearing the
cache. This could lead to the ``cache`` object being deallocated
before we used it.
Drop the ``tuplefy`` function in favor of a direct call to
``PySequence_Tuple``. It's what the ``tuple`` constructor would do
anyway and saves a few steps.
Make sure that getting ``providedBy(super())`` and
``implementedBy(super())`` have no side effects.
|
| |
|
|
| |
sequence interfaces.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Register implemented standard library types on import.
Derive the interface methods and documentation from the ABC automatically. I hope to use this for numbers too.
Part of #138
|
| |
|
|
|
|
| |
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.
|
| |
|
|
| |
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
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Explain that implements()/implementsOnly()/classProvides() not only
should not be "preferred", but are entirely not functional on Python 3.
(These notes should probably use some Sphinx directive to stand out
better, but I'm not well versed in Sphinx and I don't know which one I
should use.)
|
| | |
|
| |
|
|
| |
- Punctuation check and fix.
- Replace some figures of speech.
|
| |
|
| |
Fixed typo
|
| | |
|
| |
|
|
| |
Add cross references and some formatting fixes.
|
| | |
|
| | |
|
| |
|
|
| |
Add some missing documentation for the events component registries create.
|
| |
|
|
|
|
| |
Also bring the ``classImplements`` lines closer to the interface
declaration. This helped me be sure that nothing was missed and that
all the repetitions of the names matched.
|
| | |
|
| | |
|
| |\
| |
| | |
Drop testing and pypi-declared support of Python 3.3
|
| | | |
|
| |/
|
|
|
| |
Render the changelog on RTD so the whole documentation is there together.
No need to look up the changes on PyPI or GH.
|
| | |
|
| |
|
|
|
|
| |
See http://www.sphinx-doc.org/en/stable/config.html#confval-latex_engine
Ought to fix #111, provided that ReadTheDocs supports LuaLaTeX.
|
| |
|
| |
Classes (factories) _implement_, objects _provide_. After first carefully explaining the difference, the docs mix them up.
|
| | |
|
| |
|
|
| |
Closes: #41.
|
| |
|
|
|
| |
Changing IR to IRequire (or IRequired?) feels much more readable to me
..
|
| | |
|
| |\
| |
| |
| | |
msabramo-doc_tweaks
|
| | | |
|
| |/
|
|
|
| |
Addresses:
https://github.com/zopefoundation/zope.interface/pull/33#issuecomment-194454496
|
| | |
|
| | |
|