<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/zope-interface.git/src/zope/interface/declarations.py, branch issue224</title>
<subtitle>github.com: zopefoundation/zope.interface.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/zope-interface.git/'/>
<entry>
<title>Merge pull request #203 from zopefoundation/issue199</title>
<updated>2020-04-08T12:18:08+00:00</updated>
<author>
<name>Jason Madden</name>
<email>jamadden@gmail.com</email>
</author>
<published>2020-04-08T12:18:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/zope-interface.git/commit/?id=76203ebcd3736f598fc858bf53de9738ae523858'/>
<id>76203ebcd3736f598fc858bf53de9738ae523858</id>
<content type='text'>
Make @implementer and classImplements not add redundant interfaces</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make @implementer and classImplements not add redundant interfaces</pre>
</div>
</content>
</entry>
<entry>
<title>The ImmutableDeclaration also has immutable _v_attrs.</title>
<updated>2020-04-07T12:56:48+00:00</updated>
<author>
<name>Jason Madden</name>
<email>jamadden@gmail.com</email>
</author>
<published>2020-04-07T12:56:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/zope-interface.git/commit/?id=c500360aaba5db30e5005664d14659ed7d8186ec'/>
<id>c500360aaba5db30e5005664d14659ed7d8186ec</id>
<content type='text'>
Fixes #204
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #204
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix implementerOnly when duplicating something inherited from the parent.</title>
<updated>2020-04-07T12:32:06+00:00</updated>
<author>
<name>Jason Madden</name>
<email>jamadden@gmail.com</email>
</author>
<published>2020-04-06T16:53:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/zope-interface.git/commit/?id=97c0fbc4a3a532d1b2ec044994422d1a4ada4754'/>
<id>97c0fbc4a3a532d1b2ec044994422d1a4ada4754</id>
<content type='text'>
Seen in plone.app.testing as a problem in Products.GenericSetup.

Added tests for that.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Seen in plone.app.testing as a problem in Products.GenericSetup.

Added tests for that.
</pre>
</div>
</content>
</entry>
<entry>
<title>Special case the base Interface in @implementer/classImplements to skip the redundancy detection for the sake of plone.app.caching.</title>
<updated>2020-04-07T12:32:06+00:00</updated>
<author>
<name>Jason Madden</name>
<email>jamadden@gmail.com</email>
</author>
<published>2020-04-06T16:17:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/zope-interface.git/commit/?id=4cb3e63d3f45f0d4337bf890ec8508c3072be772'/>
<id>4cb3e63d3f45f0d4337bf890ec8508c3072be772</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make @implementer and classImplements not re-declare redundant interfaces.</title>
<updated>2020-04-07T12:32:06+00:00</updated>
<author>
<name>Jason Madden</name>
<email>jamadden@gmail.com</email>
</author>
<published>2020-04-06T12:57:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/zope-interface.git/commit/?id=46781f87ccbc02ae3d884e2dbe57b799c3804077'/>
<id>46781f87ccbc02ae3d884e2dbe57b799c3804077</id>
<content type='text'>
classImplementsOnly and @implementer_only can still be used to do that.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
classImplementsOnly and @implementer_only can still be used to do that.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove the bare except: statements.</title>
<updated>2020-04-02T12:53:05+00:00</updated>
<author>
<name>Jason Madden</name>
<email>jamadden@gmail.com</email>
</author>
<published>2020-04-02T12:53:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/zope-interface.git/commit/?id=84872a8d2ab6b980aebc1c3c1ffb6aee9cf97ea5'/>
<id>84872a8d2ab6b980aebc1c3c1ffb6aee9cf97ea5</id>
<content type='text'>
Only catch AttributeError instead of everything.

Fixes #200

Note that this does break a doctest in five.intid (it's expecting a TypeError but it now gets Acquisition's RuntimeError).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only catch AttributeError instead of everything.

Fixes #200

Note that this does break a doctest in five.intid (it's expecting a TypeError but it now gets Acquisition's RuntimeError).
</pre>
</div>
</content>
</entry>
<entry>
<title>Ensure that objects that implement no interfaces still have Interface in their iro and sro.</title>
<updated>2020-03-30T13:55:56+00:00</updated>
<author>
<name>Jason Madden</name>
<email>jamadden@gmail.com</email>
</author>
<published>2020-03-30T13:55:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/zope-interface.git/commit/?id=bfedd6f58706810ee5bac3c0d08650dcac30c215'/>
<id>bfedd6f58706810ee5bac3c0d08650dcac30c215</id>
<content type='text'>
Fixes #197.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #197.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update comments and add a test for more coverage.</title>
<updated>2020-03-19T11:54:33+00:00</updated>
<author>
<name>Jason Madden</name>
<email>jamadden@gmail.com</email>
</author>
<published>2020-03-19T11:54:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/zope-interface.git/commit/?id=42c5ad2d4f88610bb89d35152c1caa1c52dc6927'/>
<id>42c5ad2d4f88610bb89d35152c1caa1c52dc6927</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid use of a metaclass by implementeng __getattribute__.</title>
<updated>2020-03-18T17:27:20+00:00</updated>
<author>
<name>Jason Madden</name>
<email>jamadden@gmail.com</email>
</author>
<published>2020-03-11T17:19:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/zope-interface.git/commit/?id=413e716f9fb48338829435c4f243133589eb9fe6'/>
<id>413e716f9fb48338829435c4f243133589eb9fe6</id>
<content type='text'>
This is pretty, but it slows down all attribute access to interfaces.
By up to 25%. I'm not sure that's acceptable for things like
Interface.providedBy.

+-------------------------------------------+------------+-------------------------------+
| Benchmark                                 | 38-master3 | 38-faster3                    |
+===========================================+============+===============================+
| read __module__                           | 41.1 ns    | 44.3 ns: 1.08x slower (+8%)   |
+-------------------------------------------+------------+-------------------------------+
| read __name__                             | 41.3 ns    | 51.6 ns: 1.25x slower (+25%)  |
+-------------------------------------------+------------+-------------------------------+
| read __doc__                              | 41.8 ns    | 53.3 ns: 1.28x slower (+28%)  |
+-------------------------------------------+------------+-------------------------------+
| read providedBy                           | 56.7 ns    | 71.6 ns: 1.26x slower (+26%)  |
+-------------------------------------------+------------+-------------------------------+
| query adapter (no registrations)          | 3.85 ms    | 2.95 ms: 1.31x faster (-23%)  |
+-------------------------------------------+------------+-------------------------------+
| query adapter (all trivial registrations) | 4.59 ms    | 3.65 ms: 1.26x faster (-20%)  |
+-------------------------------------------+------------+-------------------------------+
| contains (empty dict)                     | 136 ns     | 55.4 ns: 2.45x faster (-59%)  |
+-------------------------------------------+------------+-------------------------------+
| contains (populated dict)                 | 137 ns     | 55.0 ns: 2.49x faster (-60%)  |
+-------------------------------------------+------------+-------------------------------+
| contains (populated list)                 | 40.2 us    | 2.95 us: 13.62x faster (-93%) |
+-------------------------------------------+------------+-------------------------------+
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is pretty, but it slows down all attribute access to interfaces.
By up to 25%. I'm not sure that's acceptable for things like
Interface.providedBy.

+-------------------------------------------+------------+-------------------------------+
| Benchmark                                 | 38-master3 | 38-faster3                    |
+===========================================+============+===============================+
| read __module__                           | 41.1 ns    | 44.3 ns: 1.08x slower (+8%)   |
+-------------------------------------------+------------+-------------------------------+
| read __name__                             | 41.3 ns    | 51.6 ns: 1.25x slower (+25%)  |
+-------------------------------------------+------------+-------------------------------+
| read __doc__                              | 41.8 ns    | 53.3 ns: 1.28x slower (+28%)  |
+-------------------------------------------+------------+-------------------------------+
| read providedBy                           | 56.7 ns    | 71.6 ns: 1.26x slower (+26%)  |
+-------------------------------------------+------------+-------------------------------+
| query adapter (no registrations)          | 3.85 ms    | 2.95 ms: 1.31x faster (-23%)  |
+-------------------------------------------+------------+-------------------------------+
| query adapter (all trivial registrations) | 4.59 ms    | 3.65 ms: 1.26x faster (-20%)  |
+-------------------------------------------+------------+-------------------------------+
| contains (empty dict)                     | 136 ns     | 55.4 ns: 2.45x faster (-59%)  |
+-------------------------------------------+------------+-------------------------------+
| contains (populated dict)                 | 137 ns     | 55.0 ns: 2.49x faster (-60%)  |
+-------------------------------------------+------------+-------------------------------+
| contains (populated list)                 | 40.2 us    | 2.95 us: 13.62x faster (-93%) |
+-------------------------------------------+------------+-------------------------------+
</pre>
</div>
</content>
</entry>
<entry>
<title>Use C3 (mostly) to compute IRO.</title>
<updated>2020-03-15T14:56:14+00:00</updated>
<author>
<name>Jason Madden</name>
<email>jamadden@gmail.com</email>
</author>
<published>2020-03-05T20:38:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/zope-interface.git/commit/?id=024f6432270afd021da2d9fff5c3f496f788e54d'/>
<id>024f6432270afd021da2d9fff5c3f496f788e54d</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
</feed>
