[Zodb-checkins] SVN: ZODB/branches/3.8/ Reverted an incomplete fix.

Jim Fulton jim at zope.com
Mon Aug 31 15:14:07 EDT 2009


Log message for revision 103423:
  Reverted an incomplete fix.
  

Changed:
  U   ZODB/branches/3.8/NEWS.txt
  U   ZODB/branches/3.8/src/ZODB/serialize.py
  U   ZODB/branches/3.8/src/ZODB/tests/testConnection.py

-=-
Modified: ZODB/branches/3.8/NEWS.txt
===================================================================
--- ZODB/branches/3.8/NEWS.txt	2009-08-31 18:49:25 UTC (rev 103422)
+++ ZODB/branches/3.8/NEWS.txt	2009-08-31 19:14:06 UTC (rev 103423)
@@ -19,10 +19,7 @@
 - Calling __setstate__ on a persistent object could under certain
   uncommon cause the process to crash.
 
-- Objects defining _p_deactivate methods that didn't call base methods
-  weren't loaded properly. https://bugs.launchpad.net/zodb/+bug/185066
 
-
 Whats new in ZODB 3.8.2
 =======================
 

Modified: ZODB/branches/3.8/src/ZODB/serialize.py
===================================================================
--- ZODB/branches/3.8/src/ZODB/serialize.py	2009-08-31 18:49:25 UTC (rev 103422)
+++ ZODB/branches/3.8/src/ZODB/serialize.py	2009-08-31 19:14:06 UTC (rev 103423)
@@ -506,9 +506,9 @@
         obj._p_oid = oid
         obj._p_jar = self._conn
         # When an object is created, it is put in the UPTODATE
-        # state.  We must explicitly invalidate it to turn it into
+        # state.  We must explicitly deactivate it to turn it into
         # a ghost.
-        obj._p_invalidate()
+        obj._p_changed = None
 
         self._cache[oid] = obj
         return obj

Modified: ZODB/branches/3.8/src/ZODB/tests/testConnection.py
===================================================================
--- ZODB/branches/3.8/src/ZODB/tests/testConnection.py	2009-08-31 18:49:25 UTC (rev 103422)
+++ ZODB/branches/3.8/src/ZODB/tests/testConnection.py	2009-08-31 19:14:06 UTC (rev 103423)
@@ -523,26 +523,6 @@
         >>> db.close()
     """
 
-
-class class_that_ignores_deactivate(Persistent):
-    def _p_deactivate(self): pass
-
-def loading_objects_that_ignore_deactivate_bug_185066():
-    """See https://bugs.launchpad.net/bugs/185066
-
-    >>> import ZODB.tests.util
-    >>> db = ZODB.tests.util.DB()
-    >>> conn = db.open()
-    >>> conn.root().c = class_that_ignores_deactivate()
-    >>> conn.root().c.x = 1
-    >>> transaction.commit()
-    >>> conn2 = db.open()
-    >>> conn2.root().c.x
-    1
-
-    """
-
-
 # ---- stubs
 
 class StubObject(Persistent):



More information about the Zodb-checkins mailing list