[Zope3-checkins] CVS: Zope3/src/zope/app/fssync - syncer.py:1.6

Guido van Rossum guido@python.org
Wed, 7 May 2003 11:42:37 -0400


Update of /cvs-repository/Zope3/src/zope/app/fssync
In directory cvs.zope.org:/tmp/cvs-serv4155

Modified Files:
	syncer.py 
Log Message:
Get rid of the hack to save+restore _p_serial -- Persistent.__setstate__
has been fixed to preserve it.


=== Zope3/src/zope/app/fssync/syncer.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/fssync/syncer.py:1.5	Tue May  6 18:04:06 2003
+++ Zope3/src/zope/app/fssync/syncer.py	Wed May  7 11:42:36 2003
@@ -233,14 +233,7 @@
                     # Nope, we have to replace.
                     _setItem(container, name, newOb, old=1)
                 else:
-                    # XXX Hack: __setstate__ wipes out _p_serial,
-                    # so for now we must save+restore it.
-                    # But really, Persistent.__setstate__ should
-                    # preserve _p_serial.
-                    oldserial = getattr(oldOb, "_p_serial", None)
                     oldOb.__setstate__(getstate())
-                    if oldserial is not None:
-                        oldOb._p_serial = oldserial
                     oldOb._p_changed = 1