[Zope3-checkins] SVN: Zope3/trunk/src/zodbcode/patch.py Pickler.__init__(): Stop using deprecated bin= argument.

Tim Peters tim.one at comcast.net
Mon Nov 1 14:02:08 EST 2004


Log message for revision 28308:
  Pickler.__init__():  Stop using deprecated bin= argument.
  
  bin= was deprecated in Python 2.3, and generates a warning in 2.4.
  Use protocol= instead.
  It's unclear whether protocol=1 is necessary here, or whether
  protocol=-1 (currently the same as protocol=2) would make more sense.
  

Changed:
  U   Zope3/trunk/src/zodbcode/patch.py

-=-
Modified: Zope3/trunk/src/zodbcode/patch.py
===================================================================
--- Zope3/trunk/src/zodbcode/patch.py	2004-11-01 18:09:56 UTC (rev 28307)
+++ Zope3/trunk/src/zodbcode/patch.py	2004-11-01 19:02:08 UTC (rev 28308)
@@ -186,8 +186,8 @@
         # stores the name of the instance's class which defeats
         # the desire to replace references to classes with
         # persistent classes.
-        pickle.Pickler.__init__(self, file, bin=True)
-        
+        pickle.Pickler.__init__(self, file, protocol=1)
+
         self._pmemo = memo
         self._wrapped = {} # set of objects already wrapped
         self._module = module



More information about the Zope3-Checkins mailing list