the DB.open method makes me wonder how it works (http://svn.zope.org/
It locks with self._a() and calls self._connectionMap which locks
too. I cannot imagine a way this could possibly work.
Look at __init__():
x = threading.RLock()
self._a = x.acquire
self._r = x.release
That is, it's a reentrant lock. See the Python docs for RLock().
I guess the lock should be released before the _connectionMap call?
Interestingly both all the tests pass and ZODB works...
That was a good clue ;-)
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org