You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add class_factory parameter to DB and ZConfig class-factory option
DB.__init__() opens a connection to verify the root object exists,
and that connection is returned to the pool for future reuse.
Connections capture the classFactory reference at creation time
(in Connection.__init__ via ObjectReader), so setting db.classFactory
after DB.__init__() does not apply to connections already in the pool.
This is a problem for Zope, which overrides DB.classFactory after
construction to provide graceful handling of broken/uninstalled objects.
The first connection handed out after startup may silently use the
wrong class factory.
Add a class_factory parameter to DB.__init__() that is set before any
connection is opened, and a corresponding class-factory option to the
ZConfig database configuration schema. This allows frameworks like
Zope to pass the class factory at construction time.
0 commit comments