[ZCM] [ZC] 578/ 3 Reject "ImplicitAcquisitionWrapper claim to be callable() but are not callable"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Tue Oct 21 10:13:42 EDT 2003


Issue #578 Update (Reject) "ImplicitAcquisitionWrapper claim to be callable() but are not callable"
 Status Rejected, Zope/bug medium
To followup, visit:
  http://collector.zope.org/Zope/578

==============================================================
= Reject - Entry #3 by Brian on Oct 21, 2003 10:13 am

 Status: Pending => Rejected

Concur - this is unlikely to be fixed in the Zope 2.x series, 
as it is part of a deeper issues with wrappers that also affects 
other Python protocol slots.

The workaround is to use:  callable(Acquisition.aq_base(ob)).

-Brian
________________________________________
= Comment - Entry #2 by stevea on Nov 20, 2002 11:53 am

This is a limitation with wrapper / proxy kinds of things in Python.

The solution we use in Zope 3 is to use a different wrapper class if the thing being wrapped is callable. This different wrapper class declares itself callable. The default wrapper class does not.

I don't think this could be made to work for Zope 2 because of the extra complexities of acquisition -- a __call__ method could be acquired from anywhere.

I'd resolve this issue as a "Won't fix" or "broken as designed" ;-)

I'll let someone else actually close this issue, though.
________________________________________
= Request - Entry #1 by ajung on Sep 20, 2002 11:53 am

The CMF portal_catalog passes sometimes an ImplicitAcquisitionWrapper to the index_object() method
of an index. callable(wrapper) return 1 but calling
wrapper() fails with an AttributeError: __call__


==============================================================




More information about the Zope-Collector-Monitor mailing list