summaryrefslogtreecommitdiff
path: root/src/zope/interface/ro.py
Commit message (Collapse)AuthorAgeFilesLines
* Make the RO for InterfaceClass consistent and fix handling of the STRICT_IRO ↵issue192-issue194Jason Madden2020-03-201-2/+11
| | | | | | | | env variable. Fixes #192 and fixes #194. Also fix the IRO for OrderedDict on CPython 2
* Move the one-base optimization down a level, and enable using pre-calculated ↵Jason Madden2020-03-181-18/+47
| | | | | | | | __sro__ for caching. In my local 'load the world' test, this went from ~7800 full C3 merges to about ~1100. Also take steps to avoid triggering false positive warnings about changed ROs when it's *just* Interface that moved.
* Use C3 (mostly) to compute IRO.issue21Jason Madden2020-03-151-9/+546
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add __all__ to all modules.issue153Jason Madden2020-02-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 100% branch coverage for 'zope.interface.ro'.Tres Seaver2014-12-081-17/+12
|
* Merge from LP branch.Tres Seaver2012-03-261-1/+1
|
* Remove CVS-era Id fossils.Tres Seaver2010-06-031-2/+0
|
* Comply with repository policy.Tres Seaver2010-04-061-1/+1
|
* Revert incorrect copyright header update.Christian Theune2009-12-171-1/+1
|
* Updating copyright header after transfer of ownership to the Zope FoundationChristian Theune2009-11-021-1/+1
|
* clean up some comments and some whitespaceGary Poster2009-10-311-3/+3
|
* replaced `_flatten` with a non-recursive implementation, effectively making ↵Andreas Zeidler2007-11-011-6/+12
| | | | it 3x faster
* Moving code to satellite.Christian Theune2007-05-031-0/+65
|
* Removed interface copyJim Fulton2006-03-111-63/+0
|
* Correcting borked move.Nathan Yergler2006-02-271-0/+63