[Zope-dev] [Proposal] Drop Mount.py from ZODB 3.5

Shane Hathaway shane at hathawaymix.org
Sat Jun 4 05:33:08 EDT 2005


Tim Peters wrote:
>     http://www.zope.org/Collectors/Zope/1800
> 
> describes some of the code problems with Zope's current way of mounting
> databases.  ZODB 3.4 (still) has a Mount.py module, unused and untested by
> ZODB.  Jim and I were both surprised today to discover that Zope (2.8) still
> imports it, so we can't drop it for ZODB 3.4 (Zope 2.8, and the ZODB 3.4 it
> uses, are both in beta).
> 
> We'd like to continue getting non-ZODB code out of the ZODB project, so
> would like to drop Mount.py from ZODB 3.5.  Are any of zodb-dev's
> "standalone" ZODB users making use of Mount.py?  I would be surprised by
> that too, since Mount.py relies on other code (like Acquisition) that's
> already been removed from the ZODB 3.3 and 3.4 lines.  I've been surprised
> before, though ...

ZODB/Mount.py is dangerous.  In the past few years, Jim and I have
discovered necessary constraints on mounted databases, and
ZODB/Mount.py has not been updated to reflect that thinking.  The main
problem is that ZODB/Mount.py does not bind each mounted connection with
a specific root database connection; instead, mounted connections are
free to be used with any root database connection.  The result is that
_v_ attributes that cross mount boundaries turn insane.

I solved the connection binding problem when I wrote the DBTab product,
but the solution required an ugly monkey patch.  Later, DBTab got folded
into Zope, but not the way I expected.  By the time I saw the
integration, it was the wrong time to fix it.  (I don't blame anyone for
this mistake; DBTab was complex and I didn't explain well enough how it
worked.)

So now there's a mess to clean up.  I suggest:

1. Products/TemporaryFolder is the only code in Zope that uses
ZODB/Mount.py.  Before the Zope 2.8.0 release, put a copy of
ZODB/Mount.py in Products/TemporaryFolder and change the import
statement to import that copy instead.

2. With the last Zope reference gone, remove ZODB/Mount.py from ZODB
3.3, 3.4, and 3.5.  If standalone ZODB authors really depend on it, they
can get their own copy and change their own import statements.

3. Update Products/ZODBMountPoint/Mount.py to use whatever method ZODB
3.5 wants to use for mounting databases, removing the ugly
ConnectionPatches.

4. Change TemporaryFolder to use Products/ZODBMountPoint/Mount.py and
finally remove Products/TemporaryFolder/Mount.py.

Shane


More information about the Zope-Dev mailing list