[Zope-dev] Adapter for class with slots
Shane Hathaway
shane at hathawaymix.org
Thu Dec 3 05:44:04 EST 2009
Wolfgang Schnerring wrote:
> The minimal reproduction recipe to see the error is this:
>
> class Slotted(object):
> __slots__ = ('__provides__')
>
> zope.component.provideAdapter(
> lambda x: True, (Slotted,), zope.interface.Interface)
>
> Which will raise
> File "/home/wosc/.python-eggs/zope.component-3.7.1-py2.6.egg/zope/component/registry.py",
> line 419, in _getAdapterRequired
> elif not ISpecification.providedBy(r):
> TypeError: 'member_descriptor' object is not callable
>
> Why is this? Can this be made to work? How would I go about
> investigating that?
It looks to me like a possible bug in zope.interface. Try deleting
_zope_interface_coptimizations.so to hopefully expand that traceback.
Shane
More information about the Zope-Dev
mailing list