[Zope3-checkins] CVS: Zope3/src/zodb/storage/tests - undo.py:1.14

Jeremy Hylton jeremy@zope.com
Fri, 25 Apr 2003 15:03:05 -0400


Update of /cvs-repository/Zope3/src/zodb/storage/tests
In directory cvs.zope.org:/tmp/cvs-serv16613/src/zodb/storage/tests

Modified Files:
	undo.py 
Log Message:
Remove _p_serial from the PyPersist_HEAD.

Persistent objects still have an _p_serial attribute, but it is stored
in the instance dict for most objects.  If a specific class doesn't
have an instance dict, it must arrange to store _p_serial somewhere
else.  The BTrees store it in their object structs.

The change reduces the __basicsize__ of all persistent objects by 4
bytes, which saves 8 bytes in practice because of obmalloc rounding.

One consequence of this change is that objects don't have an _p_serial
== None at creation time.  Two tests depended on that.


=== Zope3/src/zodb/storage/tests/undo.py 1.13 => 1.14 ===
--- Zope3/src/zodb/storage/tests/undo.py:1.13	Tue Apr 22 16:50:05 2003
+++ Zope3/src/zodb/storage/tests/undo.py	Fri Apr 25 15:02:34 2003
@@ -458,7 +458,7 @@
         self._initroot()
         obj, root, revid0 = self._linked_newobj()
         oid = obj._p_oid
-        revid1 = self._dostore(oid, data=MinPO(51), revid=obj._p_serial)
+        revid1 = self._dostore(oid, data=MinPO(51))
         # Get a packtime greater than revid1's timestamp
         snooze()
         packtime = time.time()