[Erp5-report] r42814 nicolas.dumazet - /erp5/trunk/products/ERP5Type/dynamic/lazy_class.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Jan 31 14:26:18 CET 2011
Author: nicolas.dumazet
Date: Mon Jan 31 14:26:18 2011
New Revision: 42814
URL: http://svn.erp5.org?rev=42814&view=rev
Log:
meta class fixup
Modified:
erp5/trunk/products/ERP5Type/dynamic/lazy_class.py
Modified: erp5/trunk/products/ERP5Type/dynamic/lazy_class.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/dynamic/lazy_class.py?rev=42814&r1=42813&r2=42814&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/dynamic/lazy_class.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/dynamic/lazy_class.py [utf8] Mon Jan 31 14:26:18 2011
@@ -11,6 +11,7 @@ from ZODB.broken import Broken, Persiste
from zLOG import LOG, WARNING, BLATHER
from portal_type_class import generatePortalTypeClass
+from accessor_holder import AccessorHolderType
# PersistentBroken can't be reused directly
# because its « layout differs from 'GhostPortalType' »
@@ -19,7 +20,11 @@ ERP5BaseBroken = type('ERP5BaseBroken',
if x[0] not in ('__dict__', '__module__', '__weakref__')))
-class GhostBaseMetaClass(ExtensionClass):
+# the meta class of a derived class must be a subclass of all of its bases:
+# since a portal type derives from both Zope Extension classes and
+# from Accessor Holders, both metaclasses are required, even if
+# only ExtensionClass is needed to run the house
+class GhostBaseMetaClass(ExtensionClass, AccessorHolderType):
"""
Generate classes that will be used as bases of portal types to
mark portal types as non-loaded and to force loading it.
More information about the Erp5-report
mailing list