[Zope-dev] ZPatterns bug: infinite recursion with External Attribute Provider

Phillip J. Eby pje@telecommunity.com
Sun, 17 Sep 2000 23:08:35 -0500


At 09:18 PM 9/17/00 +0100, Steve Alexander wrote:
>ZPatterns-0-4-2a2
>
>When I use an External Attribute Provider, I get an infinite recursion
>problem, and Zope hangs.

Argh.  This is what happens when I create a new feature on the spur of the
moment and toss it in just before a release.  :(

>This is because DataManager (in DataManagers.py) uses normal getattr()
>and object.__skinSlot__ methods to get and set the special attribute
>__skinSlot__ on DataSkins.

Yes, that clearly should be fixed.


>This works, in as far as I can do things like add sub-objects to a
>ZClass that derives from DataSkin and ObjectManager without infinite
>regress. However, I still get an attribute error. This is because the
>External Attribute Provider only offers to set and delete its
>attributes. I'm confused as to why this should be -- surely the External
>Attribute Provider should offer to get the same attributes as it is
>offering to set and delete?

Yes, it should, and that's my own stupid implementation error.  I forgot to
include code for that.  :(

I'll do another update release this week to fix this and the other problem
you reported (w/link to parent providers).  You might want to report the
list vs. string behavior on that one to the Collector, since that does
indeed sound like a Zope bug to me.  IMHO, multi-select properties ought to
be tuples anyway, but they certainly should never be a string.