[Zope3-checkins] CVS: Zope3/src/zodb/code - module.py:1.5

Jeremy Hylton jeremy@zope.com
Mon, 30 Dec 2002 17:52:03 -0500


Update of /cvs-repository/Zope3/src/zodb/code
In directory cvs.zope.org:/tmp/cvs-serv4885

Modified Files:
	module.py 
Log Message:
old _fixup method is no longer used


=== Zope3/src/zodb/code/module.py 1.4 => 1.5 ===
--- Zope3/src/zodb/code/module.py:1.4	Mon Dec 30 14:19:37 2002
+++ Zope3/src/zodb/code/module.py	Mon Dec 30 17:52:00 2002
@@ -153,28 +153,6 @@
         self._registry.delModule(self._module.__name__)
         self._module = None
 
-    def _fixup(self, new, old, module):
-        # Update persistent objects in place, and
-        # convert new functions to persistent functions
-        # XXX should convert classes, too
-
-        for k, v in new.items():
-            if isinstance(v, function):
-                v = new[k] = PersistentFunction(v, module)
-            elif isinstance(v.__class__, PersistentClassMetaClass):
-                v.__class__.fixup(module)
-            # XXX need to check for classes that are not persistent!
-
-            old_v = old.get(k)
-            if old_v is not None:
-                # XXX the type test below works for functions, but may
-                # not work for classes or other objects
-                if (isinstance(old_v, Persistent)
-                    and type(old_v) == type(v)):
-                    state = v.__getstate__()
-                    old_v.__setstate__(state)
-                    new[k] = old_v
-
     def _new_package(self, name):
         parent = self._get_parent(name)
         modname = name.split(".")[-1]