[Zope-CVS] CVS: Products/AdaptableStorage/serial - AspectEvent.py:1.2 DeserializationEvent.py:1.5 SerializationEvent.py:1.6

Shane Hathaway shane@zope.com
Mon, 9 Dec 2002 17:11:38 -0500


Update of /cvs-repository/Products/AdaptableStorage/serial
In directory cvs.zope.org:/tmp/cvs-serv31255/serial

Modified Files:
	AspectEvent.py DeserializationEvent.py SerializationEvent.py 
Log Message:
Successfully created a CMF site on the filesystem (yehaw!)
This involved some minor fixes:

- cPickle doesn't like anything but strings as persistent IDs.  Fixed by
  encoding (aspect_name, name) as a string.

- The "isPrincipiaFolderish" test isn't thorough enough; we really need to
  know whether the objectItems() method exists.  Switched to testing for
  the ObjectManager base class.  (In Zope 3 this will be an interface check.)

- Added a workaround for the tricky skins tool.

- New unit test for remainder pickling.

- Better integration with DBTab.


=== Products/AdaptableStorage/serial/AspectEvent.py 1.1 => 1.2 ===
--- Products/AdaptableStorage/serial/AspectEvent.py:1.1	Mon Dec  9 13:25:27 2002
+++ Products/AdaptableStorage/serial/AspectEvent.py	Mon Dec  9 17:11:07 2002
@@ -40,6 +40,7 @@
 
     def setAspectName(self, name):
         """Sets the name of the aspect being (de)serialized."""
+        assert ':' not in name
         self._aspect_name = name
 
     def getAspectName(self):


=== Products/AdaptableStorage/serial/DeserializationEvent.py 1.4 => 1.5 ===
--- Products/AdaptableStorage/serial/DeserializationEvent.py:1.4	Mon Dec  9 13:25:27 2002
+++ Products/AdaptableStorage/serial/DeserializationEvent.py	Mon Dec  9 17:11:07 2002
@@ -35,7 +35,7 @@
 
     def notifyDeserialized(self, name, value):
         """See the IDeserializationEvent interface."""
-        self._loaded_refs[(self._aspect_name, name)] = value
+        self._loaded_refs['%s:%s' % (self._aspect_name, name)] = value
 
     def dereference(self, name, keychain, mapper_names=None):
         """Retrieves a referenced subobject (usually ghosted initially).


=== Products/AdaptableStorage/serial/SerializationEvent.py 1.5 => 1.6 ===
--- Products/AdaptableStorage/serial/SerializationEvent.py:1.5	Mon Dec  9 13:25:27 2002
+++ Products/AdaptableStorage/serial/SerializationEvent.py	Mon Dec  9 17:11:07 2002
@@ -54,7 +54,7 @@
             idx = id(value)
             if not self._internal_refs.has_key(idx):
                 self._internal_ref_list.append(value)
-                self._internal_refs[idx] = (self._aspect_name, name)
+                self._internal_refs[idx] = '%s:%s' % (self._aspect_name, name)
         if is_attribute:
             self._attrs[name] = 1