[Checkins] SVN: zope.component/branches/wosc-test-stacking/NOTES.txt Update todo list

Wolfgang Schnerring wosc at wosc.de
Thu Jul 14 03:16:04 EDT 2011


Log message for revision 122212:
  Update todo list
  

Changed:
  U   zope.component/branches/wosc-test-stacking/NOTES.txt

-=-
Modified: zope.component/branches/wosc-test-stacking/NOTES.txt
===================================================================
--- zope.component/branches/wosc-test-stacking/NOTES.txt	2011-07-14 07:13:46 UTC (rev 122211)
+++ zope.component/branches/wosc-test-stacking/NOTES.txt	2011-07-14 07:16:04 UTC (rev 122212)
@@ -22,6 +22,32 @@
 
   - support stackable(PersistentList/PersistentMapping)
     (makes trouble on unpickling, does not restore stackable.stack right now)
+
+  * we have a conflict of roles:
+  a stackable object needs to fulfill three roles:
+  1. the object it delegates to
+  2. its own concerns
+  3. (new) persistence
+
+  Two of these (1+3) are outside of our control, which especially means we
+  can't control the method names in play, and it could (and does) happen that 1
+  has methods itself that reappear in 3. (example: PersistentList has its own
+  idea about __setstate__ and friends, which the Stackable itself needs too,
+  for its own persistence). --> conflict
+
+  Idea: use proxying behaviour, i.e. intercept the persistence protocol, use it
+  for Stackable's purpose *and* pass it on to the delegated object. [rejected]
+
+  Idea: Stackable doesn't have to do anything about the persistence of the
+  delegated object (will be handled automagically by the ZODB).
+  Stackable doesn't even have state of its own except the ``stack`` attribute
+  (which then takes care of itself since it's a PersistentList).
+
+  Problem: unexpected, obscure exception:
+  File "ZODB/Connection.py", line 549, in tpc_begin
+    self._normal_storage.tpc_begin(transaction)
+  AttributeError: 'NoneType' object has no attribute 'tpc_begin'
+
   - put stackable() into persistentregistry.py
   - stackable.stack needs to be a PersistentList
 
@@ -33,11 +59,11 @@
   'stackable' is Python-code? (This should only apply to tests, since we're
   going to want to create a way to bypass the stackable stuff)
 
-minor:
-
 - Name StackableBase methods with a prefix so they don't conflict with
   delegated methods (e.g. pop).
 
+minor:
+
 - rewrite persistence test to use DemoStorage instead of FileStorage
 
 



More information about the checkins mailing list