[ZPatterns] large ZPatterns bug with Zope 2.4

Steve Alexander [email protected]
Sat, 07 Jul 2001 21:54:23 +0100


Steve Alexander wrote:

 
> Nope. Disregard what I wrote before. I'd misread some of my debug output.
> 
> The problem is this line:
> 
>   DataSkins.py, line 296, method __of__
> 
>     # Bound to unwrapped parent, just try again
>     if type(parent) is not _iaw or not hasattr(parent,'REQUEST'):
>         return self
> 
> For some reason, parent had the attribute REQUEST in Zope 2.3, and 
> doesn't have the attribute REQUEST in Zope 2.4.


Wrong again!

It's because I'm using the python interactive prompt, and directly 
accessing the specialist, and using getItem, without going via a 
ZPublisher request. There is no REQUEST. This is true on Zope 2.3 and 
Zope 2.4.

I have plans to use ZPatterns outside of Zope (that is, just in the 
ZODB), so I'd be keen to get rid of DataSkin's reliance on REQUEST.

However, computed attributes *still* don't work for me on Zope 2.4.

I've a feeling it is something to do with the new restricted execution 
stuff.

More digging...

--
Steve Alexander