summaryrefslogtreecommitdiff
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
* Special case the base Interface in @implementer/classImplements to skip the ↵Jason Madden2020-04-071-1/+1
| | | | redundancy detection for the sake of plone.app.caching.
* Make @implementer and classImplements not re-declare redundant interfaces.Jason Madden2020-04-071-7/+10
| | | | classImplementsOnly and @implementer_only can still be used to do that.
* Feedback from review: whitespace, doc clarification, and a unit test showing ↵Jason Madden2020-04-071-6/+28
| | | | the precedence of __conform__ vs __adapt__.
* Let interface 'subclasses' override __adapt__.issue3Jason Madden2020-04-062-7/+44
| | | | | | | | | | | | | | | | | | | | 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 | +-------------------------------------------------------------+----------------+------------------------------+------------------------------+
* Add documentation for taggedValue and invariant.Jason Madden2020-04-062-0/+23
|
* Add more cross refs to documentation and fix a couple sphinx warnings about ↵Jason Madden2020-04-062-2/+17
| | | | duplicates in the index.
* Ensure Interface is the last item in the __sro__.Jason Madden2020-03-181-3/+16
| | | | | | None of the elegant solutions mentioned in the issue worked out, so I had to brute force it. Fixes #8
* Merge pull request #189 from zopefoundation/issue136-issue134Jason Madden2020-03-181-139/+149
|\ | | | | Documentation clarifications.
| * Documentation clarifications.issue136-issue134Jason Madden2020-03-171-139/+149
| | | | | | | | | | | | | | | | | | - 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.
* | More minor documentation fixups.issue190Jason Madden2020-03-181-2/+5
| | | | | | | | Mostly formatting. Some interfaces were being documented as clasess, which doesn't work.
* | Make Interface.getTaggedValue follow the __iro__.Jason Madden2020-03-183-5/+43
|/ | | | | | | | 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.
* Use C3 (mostly) to compute IRO.issue21Jason Madden2020-03-154-47/+187
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Make provided/implementedBy and adapter registries respect super().issue11Jason Madden2020-03-092-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update documentation and clarify the relationship of the older mapping and ↵Jason Madden2020-02-171-15/+17
| | | | sequence interfaces.
* Add interfaces for builtins and the io ABCs.Jason Madden2020-02-171-0/+10
|
* Add numbers ABC interfaces.Jason Madden2020-02-171-0/+5
|
* Add z.i.common.collections to parallel the collections.abc classes.Jason Madden2020-02-171-0/+5
| | | | | | | | 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
* Simplify the string formatting rules for the Invalid exceptions.Jason Madden2020-02-101-39/+105
| | | | | | 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.
* Make verifyObject/Class collect and raise all errors instead of only the first.issue171Jason Madden2020-02-081-23/+41
| | | | Fixes #171.
* Add warning to change note about string changes breaking doctests.Jason Madden2020-02-082-19/+35
| | | | Also tweak documentation to DRY for verifyObject/verifyClass.
* Also document the not-a-method case.issue170Jason Madden2020-02-071-0/+8
|
* Make verification errors more readable and useful.Jason Madden2020-02-071-30/+102
| | | | | | | | | | | | | | 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
* Use .. caution:: to warn about the the old class-advice based APIsdocs-in-py3Marius Gedminas2019-11-111-3/+3
|
* Move the @provider example into the right sectionMarius Gedminas2019-11-111-9/+8
| | | | | | | | | 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.)
* Port the documentation examples to Python 3Marius Gedminas2019-11-116-160/+187
|
* Update README.ru.rstSerjio Razin2019-02-121-23/+22
| | | | - Punctuation check and fix. - Replace some figures of speech.
* Update README.ru.rstSerjio Razin2019-02-111-1/+1
| | | Fixed typo
* Cross ref from ISpecification to IDeclaration.Jason Madden2018-07-191-13/+14
|
* Reorganize the 'declarations' document by functional group.Jason Madden2018-07-191-489/+401
| | | | Add cross references and some formatting fixes.
* Formatting and cross refs for the 'Interface Specification' docJason Madden2018-07-191-12/+28
|
* Formatting and cross refs for IComponents.Jason Madden2018-07-191-1/+8
|
* Basic API reference documentation reorg: split into four functional parts.Jason Madden2018-07-197-301/+398
| | | | Add some missing documentation for the events component registries create.
* Add docstrings with cross-refs to z.i.common.interfacesJason Madden2018-07-191-1/+2
| | | | | | 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.
* Basic automodule directives for the modules in zope.interface.common.Jason Madden2018-07-192-0/+31
|
* Standarize the ReST headers in api.rst.Jason Madden2018-07-191-68/+69
|
* Merge pull request #110 from zopefoundation/roto-drop-py33Joni Orponen2017-12-291-4/+3
|\ | | | | Drop testing and pypi-declared support of Python 3.3
| * Simplify and future-proof tox usage documentation.roto-drop-py33Joni Orponen2017-12-281-4/+3
| |
* | Add changelog to RTDMichael Howitz2017-12-152-0/+2
|/ | | | | Render the changelog on RTD so the whole documentation is there together. No need to look up the changes on PyPI or GH.
* Fix hardcoded version number in Sphinx docsMarius Gedminas2017-12-141-4/+9
|
* Use LuaLaTeXfix-latex-docsMarius Gedminas2017-12-071-1/+5
| | | | | | See http://www.sphinx-doc.org/en/stable/config.html#confval-latex_engine Ought to fix #111, provided that ReadTheDocs supports LuaLaTeX.
* Fix sentence in READMENiels Bom2017-03-201-1/+1
| | | Classes (factories) _implement_, objects _provide_. After first carefully explaining the difference, the docs mix them up.
* Expose IComponent documentation.Jason Madden2017-01-053-8/+41
|
* Document API for adapter registry.Tres Seaver2016-12-062-0/+21
| | | | Closes: #41.
* Editing while reading, and spell out Require and ProvideJean Jordaan2016-10-161-121/+121
| | | | | Changing IR to IRequire (or IRequired?) feels much more readable to me ..
* Editing while reading: literals, typos, grammarJean Jordaan2016-10-165-99/+99
|
* Merge branch 'doc_tweaks' of https://github.com/msabramo/zope.interface into ↵Tres Seaver2016-03-241-4/+4
|\ | | | | | | msabramo-doc_tweaks
| * docs/README.rst: Small tweaksMarc Abramowitz2015-01-261-4/+4
| |
* | Drop mention of 'python2.6' from 'docs/hacking.txt'.Tres Seaver2016-03-091-4/+4
|/ | | | | Addresses: https://github.com/zopefoundation/zope.interface/pull/33#issuecomment-194454496
* Silence Sphinx warning.Tres Seaver2015-01-221-0/+0
|
* Remove SVN fossilTres Seaver2015-01-211-1/+1
|