[ZPatterns] [Fwd: Re: [ZODB-Dev] new cPickleCache in CVS]

Phillip J. Eby pje@telecommunity.com
Mon, 18 Mar 2002 08:27:38 -0500


At 11:59 AM 3/18/02 +0000, Steve Alexander wrote:
>Hi Folks,
>
>Looks like DynPersist.c may need changing for compatibility with Zope 2.6.
>
>Then again, I was thinking of getting rid of that for the next release of 
>ZedPatterns, and replacing it with python __getattr__ and __setattr__ hooks.

Just a word of warning...  check to make sure that '__of__' is handled 
correctly on results returned from your __getattr__.  IIRC, one of the 
early releases of '__getattr__' support in the cPersistence module didn't 
handle this correctly.  I'm not sure it was ever fixed, either.

This may mean you'll have to code your Python __getattr__ to check for an 
__of__ method on the value being returned, and call it.

For simple attribute values, this isn't important, but when returning 
attributes that are objects, the lack of __of__-binding can throw off 
security and other things.