[Zope-dev] Weird IndexableObjectWrapper + TopicIndex + aq_acquired interactions.

Dieter Maurer dieter at handshake.de
Wed Sep 21 13:28:04 EDT 2005


Lennart Regebro wrote at 2005-9-21 08:18 +0200:
> ...
>>    What is the "aq_parent" that was used when wrapping the object?
>
>Eh, which one? The aq_chain of both the original aq wrapper and the
>indexableobjectrapper is correct. The aq_chain of the "outside"
>aq_wrapper is just [<self>]. Which seems expected, since aq_acquire
>think it got an object without acquisition, right?

Depending of what "<self>" is.

When an acquisition wrapper is formed, there always must some context
(which is put into "aq_parent").

Almost all contexts contain a full acquisition chain.

Maybe, we should wrap the "IndexableObjectWrapper" into the
context of the catalog?

> ...
>> Where does the context come from used when "aq_acquire" acquisition
>> wrapped the "IndexableObjectWrapper"?
>
>I don't think there is any context involved.

When an acquisition wrapper is formed, there is a context -- the
one put as "parent" argument of the acquisition wrapper constructor.

>> The best way around such problems would probably by to make
>> "IndexableObjectWrapper" a public class.
>
>"Public"?

Yes, public (to let all security checks succeed).

   Of course, this means that someone with the permission to
   customize a catalog can obtain information he may not
   gain in a different way.


-- 
Dieter


More information about the Zope-Dev mailing list