[Zope3-checkins] CVS: Zope3/src/zodb - serialize.py:1.24
Jim Fulton
cvs-admin at zope.org
Tue Dec 9 04:02:08 EST 2003
Update of /cvs-repository/Zope3/src/zodb
In directory cvs.zope.org:/tmp/cvs-serv575/src/zodb
Modified Files:
serialize.py
Log Message:
There's a bug in ZODB 4. Sometimes, persistent references aren't being
constructed correctly. The arguments for __new__ are being set to
None when they shouldn't be. This doesn't happen all the time. :/
I've added a work-around. If the construction of a ghost failes with
a type error, we will fall back to the more expensive load method.
This is a band-aid. I don't want to chase this bug down, because we
intend to replace ZODB 4 with ZODB 3.3 and there are more pressing
things to do.
=== Zope3/src/zodb/serialize.py 1.23 => 1.24 ===
--- Zope3/src/zodb/serialize.py:1.23 Sun Sep 21 13:29:59 2003
+++ Zope3/src/zodb/serialize.py Tue Dec 9 04:02:07 2003
@@ -276,7 +276,10 @@
if obj is not None:
return obj
- obj = self._new_object(*classmeta)
+ try:
+ obj = self._new_object(*classmeta)
+ except TypeError:
+ return self._conn.get(oid)
# XXX should be done by connection
obj._p_oid = oid
More information about the Zope3-Checkins
mailing list