[Zope-dev] Heads up: ZODB probably won't work with Python 2.7

Jim Fulton jim at zope.com
Fri Sep 17 18:15:34 EDT 2010


I suspect that the shenanigans played by the ZODB persistent cache
implementation is running afoul of some changes in the garbage
collection implementation in Python 2.7.

See https://bugs.launchpad.net/zodb/+bug/641481

The person reporting this was running a Python compiled in debug mode.
This will sometimes detect subtle memory management bugs not detected
with a normal build.  ZODB's tests pass with a normal Python 2.7 build
and with a debug Python 2.6 build.

I've tracked one source of crash in a debug build to the cache's
attempts to manage weak references to ghosts. Even hacking around
this, there are other crashes that, I assume, are related. :(

I'll dig further, but I strongly suspect that moving to Python 2.7
will require a cache reimplementation that uses real Python weak
references.  This won't happen in ZODB 3.10.

If there is anyone on this list who has knowledge of Python GC
internals, I'd love to get some help. :)

Jim

--
Jim Fulton


More information about the Zope-Dev mailing list