[Zope-dev] add new base classes dynamically with hotfixes

Yuppie schubbe@web.de
Thu, 18 Jul 2002 20:57:52 +0200


Hi!

I want to modify existing Zope classes without touching the code of the 
product packages. This how-to seems to fit exactly my needs:
http://www.zope.org/Members/Caseman/Dynamic_Hotfix

But one thing I don't know how to do:
 > 1. Add new base classes to existing classes, such as CatalogAware (use
 > the __bases__ attribute).

It works with (classic) Classes, as described here:
http://www.linuxjournal.com/article.php?sid=4540

But Zope uses also ExtensionClasses. The __bases__ attribute of 
ExtensionClasses appears to be read-only and ExtensionClass is a run-out 
model (see
http://mail.python.org/pipermail/python-dev/2001-December/018807.html ).

So what I'm looking for, is a work-around. Any ideas?

Thanks!

Yuppie