<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/zope-interface.git/src/zope/interface/adapter.py, branch issue230</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>Share code between registered and subscribed.</title>
<updated>2021-03-15T15:04:09+00:00</updated>
<author>
<name>Jason Madden</name>
<email>jamadden@gmail.com</email>
</author>
<published>2021-03-15T15:04:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/zope-interface.git/commit/?id=820b9b0299727b47960588b5d09d39e3911f7066'/>
<id>820b9b0299727b47960588b5d09d39e3911f7066</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add IAdapterRegistry.subscribed and Components.rebuildUtilityRegistryFromLocalCache</title>
<updated>2021-03-15T14:43:24+00:00</updated>
<author>
<name>Jason Madden</name>
<email>jamadden@gmail.com</email>
</author>
<published>2021-03-15T14:43:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/zope-interface.git/commit/?id=50c73de0a8f8712810213bd4f1ed9c2850e1c8b2'/>
<id>50c73de0a8f8712810213bd4f1ed9c2850e1c8b2</id>
<content type='text'>
Fixes #230
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #230
</pre>
</div>
</content>
</entry>
<entry>
<title>Expand on some comments. [skip ci]</title>
<updated>2021-03-15T13:42:24+00:00</updated>
<author>
<name>Jason Madden</name>
<email>jamadden@gmail.com</email>
</author>
<published>2021-03-15T13:42:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/zope-interface.git/commit/?id=67f0be521892c124dd822657b04ae01f7b25bec0'/>
<id>67f0be521892c124dd822657b04ae01f7b25bec0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Move itertools import to module scope.</title>
<updated>2021-03-15T11:32:02+00:00</updated>
<author>
<name>Jason Madden</name>
<email>jamadden@gmail.com</email>
</author>
<published>2021-03-15T11:32:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/zope-interface.git/commit/?id=a8d56b9d3cd84593c0d6c6fe509b5c60058f01a8'/>
<id>a8d56b9d3cd84593c0d6c6fe509b5c60058f01a8</id>
<content type='text'>
Also tweak docs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also tweak docs.
</pre>
</div>
</content>
</entry>
<entry>
<title>Let subclasses of BaseAdapterRegistry customize the data structures.</title>
<updated>2021-03-03T11:07:41+00:00</updated>
<author>
<name>Jason Madden</name>
<email>jamadden@gmail.com</email>
</author>
<published>2021-02-26T21:34:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/zope-interface.git/commit/?id=8a8285133b6f8ddc93ac54f1af84775e1ba6f698'/>
<id>8a8285133b6f8ddc93ac54f1af84775e1ba6f698</id>
<content type='text'>
Add extensive tests for this. Fixes #224.

Also adds test for, and fixes #227

Add BAR.rebuild() to fix the refcount issue, and to change datatypes.

It works by using the new methods allRegistrations() and allSubscriptions() to re-create the data in new data structures.

This makes fresh calls to subscribe() and register(). I went this way instead of trying to manually walk the data structures and create them because the logic in those methods is fully tested.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add extensive tests for this. Fixes #224.

Also adds test for, and fixes #227

Add BAR.rebuild() to fix the refcount issue, and to change datatypes.

It works by using the new methods allRegistrations() and allSubscriptions() to re-create the data in new data structures.

This makes fresh calls to subscribe() and register(). I went this way instead of trying to manually walk the data structures and create them because the logic in those methods is fully tested.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix interface definitions of IAdapterRegistry.subscribe, subscribers and subscriptions.</title>
<updated>2020-04-23T11:14:29+00:00</updated>
<author>
<name>Jason Madden</name>
<email>jamadden@gmail.com</email>
</author>
<published>2020-04-23T11:11:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/zope-interface.git/commit/?id=44169e9ed26400c06e4659069e0c3ea869f40c61'/>
<id>44169e9ed26400c06e4659069e0c3ea869f40c61</id>
<content type='text'>
They were defined to accept a name argument, but the actual implementation doesn't. Add tests for this. Fixes #208.

Also in test_adapter.py modernize idioms from assertTrue(x in y) and assertTrue(x is y) to assertIn and assertIs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
They were defined to accept a name argument, but the actual implementation doesn't. Add tests for this. Fixes #208.

Also in test_adapter.py modernize idioms from assertTrue(x in y) and assertTrue(x is y) to assertIn and assertIs.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make provided/implementedBy and adapter registries respect super().</title>
<updated>2020-03-09T17:51:18+00:00</updated>
<author>
<name>Jason Madden</name>
<email>jamadden@gmail.com</email>
</author>
<published>2020-03-05T15:52:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/zope-interface.git/commit/?id=1e720c3819b8daa07aaad0ee0258d9035597f27d'/>
<id>1e720c3819b8daa07aaad0ee0258d9035597f27d</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add __all__ to all modules.</title>
<updated>2020-02-05T14:12:53+00:00</updated>
<author>
<name>Jason Madden</name>
<email>jamadden@gmail.com</email>
</author>
<published>2020-02-05T14:12:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/zope-interface.git/commit/?id=c4805da768863207b5dd182b3c0dd2aacc7be92f'/>
<id>c4805da768863207b5dd182b3c0dd2aacc7be92f</id>
<content type='text'>
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
 &gt;&gt;&gt; from pprint import pprint
 &gt;&gt;&gt; from zope.interface import *
 &gt;&gt;&gt; from zope.interface import Interface
 &gt;&gt;&gt; from zope.interface import Interface, Attribute, implementer
 &gt;&gt;&gt; from zope.interface import alsoProvides
 &gt;&gt;&gt; from zope.interface import classImplements
 &gt;&gt;&gt; from zope.interface import classImplementsOnly
 &gt;&gt;&gt; from zope.interface import directlyProvidedBy
 &gt;&gt;&gt; from zope.interface import directlyProvides
 &gt;&gt;&gt; from zope.interface import implementedBy
 &gt;&gt;&gt; from zope.interface import implementer
 &gt;&gt;&gt; from zope.interface import implementer_only
 &gt;&gt;&gt; from zope.interface import noLongerProvides
 &gt;&gt;&gt; from zope.interface import providedBy
 &gt;&gt;&gt; from zope.interface import provider
 &gt;&gt;&gt; from zope.interface.adapter import AdapterRegistry
 &gt;&gt;&gt; from zope.interface.declarations import Declaration
 &gt;&gt;&gt; from zope.interface.declarations import InstanceDeclarations
 &gt;&gt;&gt; from zope.interface.declarations import ProvidesClass
 &gt;&gt;&gt; from zope.interface.declarations import named
 &gt;&gt;&gt; from zope.interface.exceptions import BrokenImplementation
 &gt;&gt;&gt; from zope.interface.exceptions import Invalid
 &gt;&gt;&gt; from zope.interface.interface import Specification
 &gt;&gt;&gt; from zope.interface.interface import adapter_hooks
 &gt;&gt;&gt; from zope.interface.verify import verifyObject
 &gt;&gt;&gt; import gc
 &gt;&gt;&gt; import zope.interface

And also some personal judgement about what the public API is that I'm
more than happy to have reviewed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
 &gt;&gt;&gt; from pprint import pprint
 &gt;&gt;&gt; from zope.interface import *
 &gt;&gt;&gt; from zope.interface import Interface
 &gt;&gt;&gt; from zope.interface import Interface, Attribute, implementer
 &gt;&gt;&gt; from zope.interface import alsoProvides
 &gt;&gt;&gt; from zope.interface import classImplements
 &gt;&gt;&gt; from zope.interface import classImplementsOnly
 &gt;&gt;&gt; from zope.interface import directlyProvidedBy
 &gt;&gt;&gt; from zope.interface import directlyProvides
 &gt;&gt;&gt; from zope.interface import implementedBy
 &gt;&gt;&gt; from zope.interface import implementer
 &gt;&gt;&gt; from zope.interface import implementer_only
 &gt;&gt;&gt; from zope.interface import noLongerProvides
 &gt;&gt;&gt; from zope.interface import providedBy
 &gt;&gt;&gt; from zope.interface import provider
 &gt;&gt;&gt; from zope.interface.adapter import AdapterRegistry
 &gt;&gt;&gt; from zope.interface.declarations import Declaration
 &gt;&gt;&gt; from zope.interface.declarations import InstanceDeclarations
 &gt;&gt;&gt; from zope.interface.declarations import ProvidesClass
 &gt;&gt;&gt; from zope.interface.declarations import named
 &gt;&gt;&gt; from zope.interface.exceptions import BrokenImplementation
 &gt;&gt;&gt; from zope.interface.exceptions import Invalid
 &gt;&gt;&gt; from zope.interface.interface import Specification
 &gt;&gt;&gt; from zope.interface.interface import adapter_hooks
 &gt;&gt;&gt; from zope.interface.verify import verifyObject
 &gt;&gt;&gt; import gc
 &gt;&gt;&gt; import zope.interface

And also some personal judgement about what the public API is that I'm
more than happy to have reviewed.
</pre>
</div>
</content>
</entry>
<entry>
<title>better naming</title>
<updated>2020-02-04T20:00:01+00:00</updated>
<author>
<name>Jens W. Klein</name>
<email>jk@kleinundpartner.at</email>
</author>
<published>2020-02-04T20:00:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/zope-interface.git/commit/?id=1a7e4dc0c3e2bd4b1ece814efce7a34fbbf6efbf'/>
<id>1a7e4dc0c3e2bd4b1ece814efce7a34fbbf6efbf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>iPerformace optimization in _lookup _lookupAll _subscriptions</title>
<updated>2020-02-04T18:55:23+00:00</updated>
<author>
<name>Jens W. Klein</name>
<email>jk@kleinundpartner.at</email>
</author>
<published>2020-02-04T18:50:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/zope-interface.git/commit/?id=8ab01943066bc2564efe2a2d554e71658ff88cd8'/>
<id>8ab01943066bc2564efe2a2d554e71658ff88cd8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
