--- a/cwvreg.py Mon May 23 13:35:09 2011 +0200
+++ b/cwvreg.py Mon May 23 11:36:43 2011 +0200
@@ -204,7 +204,6 @@
from cubicweb import (ETYPE_NAME_MAP, Binary, UnknownProperty, UnknownEid,
ObjectNotFound, NoSelectableObject, RegistryNotFound,
CW_EVENT_MANAGER)
-from cubicweb.utils import dump_class
from cubicweb.vregistry import VRegistry, Registry, class_regid, classid
from cubicweb.rtags import RTAGS
@@ -368,7 +367,10 @@
# make a copy event if cls.__regid__ == etype, else we may have pb for
# client application using multiple connections to different
# repositories (eg shingouz)
- cls = dump_class(cls, etype)
+ # __autogenerated__ attribute is just a marker
+ cls = type(str(etype), (cls,), {'__autogenerated__': True,
+ '__doc__': cls.__doc__,
+ '__module__': cls.__module__})
cls.__regid__ = etype
cls.__initialize__(self.schema)
return cls