The ZODB implements an important optimization for persistent references:
it can include a class reference in a persistent reference
such that a ghost can be instanciated without loading the object.
In order for this optimization to be possible, the class must
not define "__getnewargs__". Unfortunately, "ExtensionClass.Base"
defines it and therefore prevents this optimization for
ExtensionClass instances (i.e. for all Zope2 objects).
The attached patch removes the "__getnewargs__" definition
from "ExtensionClass.Base", changes the "_reduce" definition
accordingly and updates the tests.
Uploaded: ec_getnewargs.pat
The ZODB implements an important optimization for persistent references:
it can include a class reference in a persistent reference
such that a ghost can be instanciated without loading the object.
In order for this optimization to be possible, the class must .Base"
not define "__getnewargs__". Unfortunately, "ExtensionClass
defines it and therefore prevents this optimization for
ExtensionClass instances (i.e. for all Zope2 objects).
The attached patch removes the "__getnewargs__" definition .Base", changes the "_reduce" definition
from "ExtensionClass
accordingly and updates the tests.