Index: src/persistent/picklecache.py
===================================================================
--- src/persistent/picklecache.py	(revision 122718)
+++ src/persistent/picklecache.py	(working copy)
@@ -65,7 +65,8 @@
             raise ValueError('OID must be string: %s' % oid)
         # XXX
         if oid in self.persistent_classes or oid in self.data:
-            raise KeyError('Duplicate OID: %s' % oid)
+            if self.data[oid] is not value:
+                raise KeyError('Duplicate OID: %s' % oid)
         if type(value) is type:
             self.persistent_classes[oid] = value
         else:
@@ -255,3 +256,5 @@
         elif oid in self.persistent_classes:
             del self.persistent_classes[oid]
 
+    def update_object_size_estimation(self, oid, new_size):
+        pass
Index: src/persistent/pyPersistence.py
===================================================================
--- src/persistent/pyPersistence.py	(revision 122718)
+++ src/persistent/pyPersistence.py	(working copy)
@@ -80,7 +80,7 @@
     __slots__ = ('__jar', '__oid', '__serial', '__flags', '__size')
     implements(IPersistent)
 
-    def __new__(cls):
+    def __new__(cls, *args, **kw):
         inst = super(Persistent, cls).__new__(cls)
         inst.__jar = None
         inst.__oid = None
Index: src/persistent/__init__.py
===================================================================
--- src/persistent/__init__.py	(revision 122718)
+++ src/persistent/__init__.py	(working copy)
@@ -39,6 +39,13 @@
 except ImportError:
     from picklecache import PickleCache
 
+try:
+    import TimeStamp
+except ImportError:
+    import timestamp as TimeStamp
+    import sys
+    sys.modules['persistent.TimeStamp'] = sys.modules['persistent.timestamp']
+
 if _HAVE_CPERSISTENCE:
     # Make an interface declaration for Persistent, if zope.interface
     # is available.  XXX that the pyPersistent version already does this?
Index: src/BTrees/___BTree.py
===================================================================
--- src/BTrees/___BTree.py	(revision 122717)
+++ src/BTrees/___BTree.py	(working copy)
@@ -477,7 +477,19 @@
         for i in range(0, len(state), 2):
             keys.append(state[i])
             values.append(state[i+1])
+    
+    def toString(self):
+        return ''.join(self.keys() + self.values())
+    
+    def fromString(self, s):
+        r = len(s) // 8
+        for i in range(r):
+            k = s[i*2:i*2+2]
+            v = s[r*2+i*6:r*2+i*6+6]
+            self[k] = v
+        return self
 
+
 class Set(_SetBase, _BucketBase):
 
     def __getstate__(self):
Index: src/BTrees/objectkeymacros.h
===================================================================
--- src/BTrees/objectkeymacros.h	(revision 122717)
+++ src/BTrees/objectkeymacros.h	(working copy)
@@ -9,6 +9,7 @@
 static int
 check_argument_cmp(PyObject *arg)
 {
+  return 1;
   /* printf("check cmp %p %p %p %p\n",  */
   /*        arg->ob_type->tp_richcompare, */
   /*        ((PyTypeObject *)object_)->ob_type->tp_richcompare, */
Index: src/ZEO/zrpc/marshal.py
===================================================================
--- src/ZEO/zrpc/marshal.py	(revision 122717)
+++ src/ZEO/zrpc/marshal.py	(working copy)
@@ -33,7 +33,7 @@
     # pickle.py does not.
     pickler = Pickler(1)
     pickler.fast = 1
-    return pickler.dump(args, 1)
+    return pickler.dump(args)
 
 
 @apply
Index: src/ZODB/serialize.py
===================================================================
--- src/ZODB/serialize.py	(revision 122717)
+++ src/ZODB/serialize.py	(working copy)
@@ -625,9 +625,9 @@
 
     refs = []
     u = cPickle.Unpickler(cStringIO.StringIO(p))
-    u.persistent_load = refs
-    u.noload()
-    u.noload()
+    u.persistent_load = refs.append
+    u.load()
+    u.load()
 
     # Now we have a list of referencs.  Need to convert to list of
     # oids:
Index: setup.py
===================================================================
--- setup.py	(revision 122717)
+++ setup.py	(working copy)
@@ -121,6 +121,7 @@
          cPickleCache,
          TimeStamp,
         ]
+exts = []
 
 def _modname(path, base, name=''):
     if path == base:
