[Zodb-checkins] CVS: Zope3/src/persistence/tests - test_persistence.py:1.8

Jeremy Hylton jeremy at zope.com
Fri Apr 25 16:03:06 EDT 2003


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

Modified Files:
	test_persistence.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/persistence/tests/test_persistence.py 1.7 => 1.8 ===
--- Zope3/src/persistence/tests/test_persistence.py:1.7	Thu Apr 17 14:38:53 2003
+++ Zope3/src/persistence/tests/test_persistence.py	Fri Apr 25 15:02:35 2003
@@ -63,7 +63,6 @@
         self.assertEqual(p._p_changed, 0)
         self.assertEqual(p._p_jar, None)
         self.assertEqual(p._p_oid, None)
-        self.assertEqual(p._p_serial, None)
         p.inc()
         p.inc()
         self.assertEqual(p.x, 2)




More information about the Zodb-checkins mailing list