[Zodb-checkins] CVS: ZODB3/ZODB - Connection.py:1.114.2.3 serialize.py:1.2.10.3

Jim Fulton jim at zope.com
Fri Jan 16 10:44:08 EST 2004


Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv19071/src/ZODB

Modified Files:
      Tag: zope3-zodb3-devel-branch
	Connection.py serialize.py 
Log Message:
Various changes to get tests passing.


=== ZODB3/ZODB/Connection.py 1.114.2.2 => 1.114.2.3 ===
--- ZODB3/ZODB/Connection.py:1.114.2.2	Fri Jan  9 15:30:32 2004
+++ ZODB3/ZODB/Connection.py	Fri Jan 16 10:43:27 2004
@@ -285,7 +285,9 @@
         for obj in w:
             oid = obj._p_oid
             serial = getattr(obj, '_p_serial', z64)
-            if serial == z64:
+
+            # XXX which one? z64 or None? Why do I have to check both?
+            if serial == z64 or serial is None:
                 # new object
                 self._creating.append(oid)
             else:


=== ZODB3/ZODB/serialize.py 1.2.10.2 => 1.2.10.3 ===
--- ZODB3/ZODB/serialize.py:1.2.10.2	Fri Jan  9 15:30:32 2004
+++ ZODB3/ZODB/serialize.py	Fri Jan 16 10:43:27 2004
@@ -72,7 +72,11 @@
     return getattr(obj, name, _marker) is not _marker
 
 def getClassMetadata(obj):
-    klass = obj.__class__
+
+    # We don't use __class__ here, because obj could be a persistent proxy.
+    # We don't want to be folled by proxies.
+    klass = type(obj)
+
     newargs = getattr(klass, "__getnewargs__", None)
     if newargs is None:
         return klass




More information about the Zodb-checkins mailing list