[Zope-CVS] CVS: Products/Ape/lib/apelib/zope2 - ofsserial.py:1.7.2.1
Shane Hathaway
shane at zope.com
Wed Feb 25 22:09:27 EST 2004
Update of /cvs-repository/Products/Ape/lib/apelib/zope2
In directory cvs.zope.org:/tmp/cvs-serv4850/lib/apelib/zope2
Modified Files:
Tag: ape-fs-oid-branch
ofsserial.py
Log Message:
Fixed bugs. All automated tests pass with the new filesystem OID code.
With this working, the _setOb patch became unnecessary. The TmpStore
monkey patch is also obsolete. Only one patch remains, and it's not
much of a problem. Yay!
=== Products/Ape/lib/apelib/zope2/ofsserial.py 1.7 => 1.7.2.1 ===
--- Products/Ape/lib/apelib/zope2/ofsserial.py:1.7 Tue Feb 17 00:25:13 2004
+++ Products/Ape/lib/apelib/zope2/ofsserial.py Wed Feb 25 22:08:56 2004
@@ -84,13 +84,6 @@
schema.addField('oid', 'string')
schema.addField('classification', 'classification')
- # The fixed_oids flag must be turned on when serializing to
- # an object system with meaningful OIDs (like the filesystem.)
- # It doesn't need to be on for object systems with arbitrary
- # OIDs such as SQL databases.
- def __init__(self, fixed_oids=1):
- self.fixed_oids = fixed_oids
-
def canSerialize(self, obj):
return isinstance(obj, ObjectManager)
@@ -111,18 +104,11 @@
event.referenced(id, base, True, oid)
# No need to pass classification.
state.append((id, oid, None))
- if self.fixed_oids:
- event.ignore('_use_fixed_oids_')
- # Add a marker that tells the folder it has to move/rename
- # in a special way. The _setOb patch sees this attribute.
- obj._use_fixed_oids_ = 1
return state
def deserialize(self, event, state):
obj = event.obj
assert isinstance(obj, ObjectManager), obj
- if self.fixed_oids:
- obj._use_fixed_oids_ = 1
for (id, oid, classification) in state:
subob = event.resolve(id, oid, classification)
setattr(obj, id, subob)
More information about the Zope-CVS
mailing list