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

2005-06-13 Thread John Barratt

Jo Meder wrote:

A long time ago, Shane posted a very useful function
to analyse acquisition wrappers: "showaq".

Maybe, the mailing list archive is still able to locate his post...



Just ask Google: http://www.zope.org/Members/chrisw/showaq


Thanks Jo.  It seems though that there was a branch containing further 
ZClass fixes that was merged into Zope 2.8 final that wasn't in b2 that 
fixed this problem.


JB.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


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

2005-06-10 Thread Jo Meder
Am 09.06.2005, 19:28 Uhr
schrieb Dieter Maurer <[EMAIL PROTECTED]>:

> A long time ago, Shane posted a very useful function
> to analyse acquisition wrappers: "showaq".
> 
> Maybe, the mailing list archive is still able to locate his post...

Just ask Google: http://www.zope.org/Members/chrisw/showaq

Jo.


-- 
internetmanufaktur jo- Berlin, Germany
  |||meder---fon: ++49-30-417 17 63 33
http://www.meder.de/ --- fax: ++49-30-417 17 63 45
Kollwitzstr. 75  mob: ++49-170- 2 98 89 97
10435 Berlin ---http://www.meder.de/keys/jo-pubkey.txt
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


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

2005-06-09 Thread Dieter Maurer
John Barratt wrote at 2005-6-9 16:54 +1000:
> ...
>I would hence suspect the wrapping, and/or behaviour of the object 
>and/or context to be somehow different?

A long time ago, Shane posted a very useful function
to analyse acquisition wrappers: "showaq".

Maybe, the mailing list archive is still able to locate his post...

-- 
Dieter
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


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

2005-06-08 Thread John Barratt

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.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


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

2005-06-08 Thread Dieter Maurer
John Barratt wrote at 2005-6-7 10:08 +1000:
> ...
> From a bit of digging through the code it seems there is a difference 
>comes about in the call on line 166 of AccessControl.User inside 
>_check_context :
>
> return object.aq_inContextOf(context, 1)
>
>In Zope 2.8 it returns 0, in 2.76 it returns 1

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.

-- 
Dieter
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )