• Jeremy Hylton's avatar
    Change the implementation of mounted connections. · 46b304bd
    Jeremy Hylton authored
    Avoid the monkey patch by creating a subclass of Connection and
    installing it as the klass attribute of ZODB's DB class.  I think this
    works correctly in conjunction with Zope configuration (the tests
    pass) -- but I'm not qualified to say for sure.
    
    Rework the logic of MountConnection as part of the restructuring.  The
    _root_connection attribute always points to the root, never to None;
    so the root object points to itself.  This change necessitated a
    chance in DBTab.ClassFactories.  Add some comments there to explain
    what's going on.
    
    XXX The close() method on MountConnection is re-implementing two
    methods in modules.  If those implementations change, it would need to
    change, too.  We ought to find a better way to integrate it.
    
    XXX Perhaps the mounted connection stuff should be folded into ZODB
    proper.
    46b304bd
Mount.py 7.17 KB