ZClass problem in 2.8 (Was: Re: [Zope-dev] Upcoming Zope 2.8 release)

John Barratt jlb at ball.langarson.com.au
Thu Jun 9 02:54:57 EDT 2005


Dieter Maurer wrote:
> Looks like an acquisition bug:
> 
>       obj.aq_inContextOf(context, 1) is recursively defined by:
> 
> 	  True, if "obj.aq_base == context.aq_base"
> 	  or "container(obj) is not None"
> 	  and "container(obj).aq_inContextOf(context, 1)"
> 
> 	  where "container(obj)" is "aq_parent(aq_inner(obj))"
> 	  which is the container containing "obj".
> 
> which is equivalent to (resolving the recursing):
> 
>       obj.aq_inContextOf(context, 1)
>       iff for some (hierarchie) ancestor "a" of obj,
>       "a.aq_base == context.aq_base".
> 
> Given this definition, you can check which implementation
> is wrong and file a bug report.

Looking at the relevant *Acquisition.c files, both implementations of 
aq_inContextOf(2.7.6 & 2.8.0b2) are identical.  The implementation of 
macros used in this method (isWrapper, WRAPPER, and OBJECT) are also 
identitcal, there being nothing else immediately  obvious that looks 
like it could have been implemented differently there.

I would hence suspect the wrapping, and/or behaviour of the object 
and/or context to be somehow different?

JB.


More information about the Zope-Dev mailing list