[Zope-Checkins] CVS: Zope/lib/python/TreeDisplay - TreeTag.py:1.58
Casey Duncan
casey at zope.com
Thu Apr 29 15:03:10 EDT 2004
Update of /cvs-repository/Zope/lib/python/TreeDisplay
In directory cvs.zope.org:/tmp/cvs-serv29005/lib/python/TreeDisplay
Modified Files:
TreeTag.py
Log Message:
Fix TreeTag persistence. Unpickler used to decode the state refused to decode st
rings, thereby rendering all tree-states undecodeable. Strings are now allowed t
o be unpickled.
=== Zope/lib/python/TreeDisplay/TreeTag.py 1.57 => 1.58 ===
--- Zope/lib/python/TreeDisplay/TreeTag.py:1.57 Thu Jan 15 17:58:25 2004
+++ Zope/lib/python/TreeDisplay/TreeTag.py Thu Apr 29 15:03:08 2004
@@ -671,7 +671,7 @@
dispatch = pickle.Unpickler.dispatch.copy()
for k,v in dispatch.items():
- if k=='' or k in '().012FGIJKLMNTUVX]adeghjlpqrstu}':
+ if k=='' or k in '().012FGIJKLMNTUVXS]adeghjlpqrstu}':
# This key is necessary and safe, so leave it in the map
pass
else:
@@ -683,11 +683,6 @@
elif k in [pickle.PERSID, pickle.BINPERSID]:
# These are just unnecessary
pass
- elif k in [pickle.STRING]:
- # This one is controversial: A string is harmlessm, but the
- # implementation of pickle leaks memory (strings may be interned)
- # The problem can be avoided by using binary pickles.
- pass
del k
del v
@@ -705,7 +700,6 @@
class _junk_class: pass
def _test():
- _should_fail('hello',0)
_should_succeed('hello')
_should_succeed(1)
_should_succeed(1L)
More information about the Zope-Checkins
mailing list