[ZCM] [ZC] 387/ 2 Resolve "Changing base classes of ZClasses"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Tue Oct 21 09:58:35 EDT 2003


Issue #387 Update (Resolve) "Changing base classes of ZClasses"
 Status Resolved, Zope/bug+solution medium
To followup, visit:
  http://collector.zope.org/Zope/387

==============================================================
= Resolve - Entry #2 by Brian on Oct 21, 2003 9:58 am

 Status: Pending => Resolved

fixed for head, 2.6 branch and 2.7 branch
________________________________________
= Request - Entry #1 by Anonymous User on May 9, 2002 8:59 pm

A bug in my favorite function ZClass::_setBasesHoldOnToyourButts :

when changing the bases of non-persistent ZClasses (pluggable brains) they are set to persistent after the change and no more usable as pluggable brains.

Solution:

    def _setBasesHoldOnToYourButts(self, bases):
        # Eeeek
        copy=self.__class__(self.id, self.title, bases,hasattr(self._zclass_,'_p_deactivate'))
...

instead of
     copy=self.__class__(self.id, self.title, bases)

I used there your trick  from DA.py to check wether the ZClass is persistent.

thanks

phil

==============================================================




More information about the Zope-Collector-Monitor mailing list