[zope2-tracker] [Bug 434422] [NEW] Endless loop with Acquisition	and ILocation in	Products.Five.component findSite
    gweis 
    gerhard.weis at gmail.com
       
    Mon Sep 21 23:34:05 EDT 2009
    
    
  
Public bug reported:
Prodcuts.Five.component findSite using the ILocation API or if not
available the Acquisition chain to find a parent object. If an object
Acquisition wrapped object implements the ILocation API the parent
retrieved from obj.__parent__ is aq-wrapped in the context of obj which
leads to an endless loop in finding an ISite.
The attached patches contain a doc-test to demonstrate the behaviour and
a suggested fix. The fix just checks if the object is aq-wrapped before
accessing the __parent__ attribute. This basically means, Acquisition is
given preference to ILocation.
The patch against current Zope 2.11 development branch, and most likely
applies to 2.10 too. I am not sure about 2.12 because there have been
some changes to the Acquisition module.
cheers
Gerhard
** Affects: zope2
     Importance: Undecided
         Status: New
-- 
Endless loop with Acquisition and ILocation in Products.Five.component findSite
https://bugs.launchpad.net/bugs/434422
You received this bug notification because you are a member of Zope 2
Developers, which is subscribed to Zope 2.
    
    
More information about the zope2-tracker
mailing list