[Zope-dev] Re: New-style ExtensionClasses (Zope 2.8) -- MRO issue

Jim Fulton jim at zope.com
Fri Oct 31 14:39:28 EST 2003


Jim Fulton wrote:

...

> An initial analysis showed that for more than half of the classes in
> Zope 2, it was impossible to compute a method-resolution order using
> the new algorithm.  After about a day of analysis (and development of
> a tool to aid in the analysis) I've been able to adjust the Zope
> classes so that they will work with the new algorithm.
> 
> I also analyzed the CMF head.  To use the new algorithm with the CMF,
> it was necessary to make some changes to the CMF and to Zope.  In one
> case, it was necessary to copy some methods around.

I've checked the results of my work into the mro-advanture-branch (waa,
I wish I cud spell) branch.

You might find it entertaining to check out Zope on this branch:

   cvs co -rmro-advanture-branch Zope

(and build it) (Note, Python2.3 is required.)

Install your favorite products (CMF makes a nice example)
and then use the functions in the included mrohell module to
find out if you have a problem:

   cd Zope
   bin/zopectl debug
   >>> import mrohell
   >>> base = merohell.step1()
   >>> mrohell.step2(base, mroonly=True)

and see if you get any mro problems.  If you do, see if you can
figure out how to fix them.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org




More information about the Zope-Dev mailing list