[Zope-dev] makerequest issues
Stefan H. Holek
stefan at epy.co.at
Wed Apr 5 05:48:31 EDT 2006
On 4. Apr 2006, at 22:08, Paul Winkler wrote:
> On Tue, Apr 04, 2006 at 08:09:05PM +0200, Stefan H. Holek wrote:
>> This looks fine to me because the world ends at parent. Your earlier
>> example wrapped an object that was in the middle of an acquisition
>> chain (IIRC),
>
> no, I think you invented that :)
>
Ok, I retract ;-)
>> which I am not sure I like. You are safe to wrap the
>> top-most object, be it a true "app" or not.
>
> OK. In that case, 2057 really *is* a bug.
> http://www.zope.org/Collectors/Zope/2057
Well, thing is that getPhysicalPath of Traversable looks like this:
def getPhysicalPath(self):
path = (self.getId(),)
p = aq_parent(aq_inner(self))
if p is not None:
path = p.getPhysicalPath() + path
return path
whereas getPhysicalPath of Application looks like this:
def getPhysicalPath(self):
# We're at the base of the path.
return ('',)
As you can see Application is designed to terminate the lookup
recursion. With "safe" I meant with regard to acquiring the REQUEST,
granted getPhysicalPath breaks (time for another half-retraction it
seems).
Regarding your patch, why do you use lambda: () and not lambda: ('',)?
Stefan
--
Anything that happens, happens. --Douglas Adams
More information about the Zope-Dev
mailing list