[Zope-dev] Re: Zope2 porting failure in Products

Hanno Schlichting plone at hannosch.info
Mon Jul 21 11:31:38 EDT 2008


Martijn Faassen wrote:
> On Mon, Jul 21, 2008 at 8:40 AM, ranjith kannikara
> <ranjithkannikara at gmail.com> wrote:
> 
> [snip]
>> I hope the code for this assert (used in line "assert self.aq_base ==
>> self" ) is defined for zope and can be fixed with not so much effort.
>> Can any one suggest where why these different versions are showing two results.
>> Or the file or code segment that does this assertion .
> 
> I don't know why there is a different result, but it's important to
> find out. Otherwise all sorts of assumptions might be broken! That
> said, it's in a module aqlegacy.py, I wonder what the purpose of that
> module is.

The module aqlegacy.py was added by philiKON and me and fakes 
Acquisition support (by providing all required methods) for classes not 
inheriting from Acquisition anymore.

This was part of the AQ vs. __parent__ merge. For example Five 
BrowserView's don't inherit from any Acquistion base classes anymore, 
but for backwards compatibility we still provide the methods (aq_parent, 
aq_inner, ...) on the class, since lots of code out in the wild might 
use them.

If the assert statement fails now, the actual cause needs to be 
investigated and fixed.

Hanno



More information about the Zope-Dev mailing list