[Checkins] SVN: keas.pbstate/trunk/src/keas/pbstate/ added docs and simplified serial format name

Shane Hathaway shane at hathawaymix.org
Thu Jan 22 00:24:29 EST 2009


Log message for revision 94923:
  added docs and simplified serial format name

Changed:
  U   keas.pbstate/trunk/src/keas/pbstate/README.txt
  U   keas.pbstate/trunk/src/keas/pbstate/state.py

-=-
Modified: keas.pbstate/trunk/src/keas/pbstate/README.txt
===================================================================
--- keas.pbstate/trunk/src/keas/pbstate/README.txt	2009-01-22 05:12:46 UTC (rev 94922)
+++ keas.pbstate/trunk/src/keas/pbstate/README.txt	2009-01-22 05:24:28 UTC (rev 94923)
@@ -247,10 +247,12 @@
 
 The tuple returned by __getstate__ is actually a subclass of tuple.  The
 StateTuple suggests to the ZODB serializer that it can save the state
-without pickling.
+in a different format than the default pickle format.
 
     >>> type(c.__getstate__())
     <class 'keas.pbstate.state.StateTuple'>
+    >>> c.__getstate__().serial_format
+    'protobuf'
 
 
 Edge Cases

Modified: keas.pbstate/trunk/src/keas/pbstate/state.py
===================================================================
--- keas.pbstate/trunk/src/keas/pbstate/state.py	2009-01-22 05:12:46 UTC (rev 94922)
+++ keas.pbstate/trunk/src/keas/pbstate/state.py	2009-01-22 05:24:28 UTC (rev 94923)
@@ -4,4 +4,7 @@
     """Contains the persistent state of a ProtobufState object.
 
     Contains data (a byte string) and targets (a map of refid to object).
+    This state class has an attribute, 'serial_format', that provides
+    a hint on how the state ought to be serialized.
     """
+    serial_format = 'protobuf'



More information about the Checkins mailing list