[Zope] Metaclasses in ZOPE Products

Jan-Ole Esleben esleben at gmail.com
Sun Aug 7 13:02:51 EDT 2005


Hi!

What do I need to do to derive a new base class for my products from
item that defines its own meta class? There's a whole mess of code in
the Zope source code that deals with meta classes, but nothing I can
actually identify as the thing to do.

I am deriving from SimpleItem at the moment. Currently, I use a meta
class derived from type, but this doesn't work:

  File "E:\Python23\lib\fliwas\ccitem.py", line 54, in ?
    class CCItem(SimpleItem):
  File "E:\Python23\lib\fliwas\ccmethods.py", line 38, in __new__
    return type.__new__(cls, name, bases, classdict)
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-s
trict) subclass of the metaclasses of all its bases

I'm guessing that using a certain base class for my meta class should
work, but the documentation doesn't say (as far as I can find out).

TIA,
Ole


More information about the Zope mailing list