]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
The default shelve pickle protocol should have been 3.
authorRaymond Hettinger <python@rcn.com>
Tue, 3 Feb 2009 04:16:34 +0000 (04:16 +0000)
committerRaymond Hettinger <python@rcn.com>
Tue, 3 Feb 2009 04:16:34 +0000 (04:16 +0000)
Doc/library/shelve.rst
Lib/shelve.py
Misc/NEWS

index 1c35f4781cdae6278514226eaf5f80a81bf4f3dd..44eff59d67da75f22af1e75c1585d72c157ce3ff 100644 (file)
@@ -23,7 +23,7 @@ lots of shared  sub-objects.  The keys are ordinary strings.
    database file is opened for reading and writing.  The optional *flag* parameter
    has the same interpretation as the *flag* parameter of :func:`dbm.open`.
 
-   By default, version 0 pickles are used to serialize values.  The version of the
+   By default, version 3 pickles are used to serialize values.  The version of the
    pickle protocol can be specified with the *protocol* parameter.
 
    By default, mutations to persistent-dictionary mutable entries are not
index cf6dac65f47e08d2f2b1383e53b7bafa3feaa8b6..fb2fa93b0100ae51c6a953374d7c2eeb254d7b55 100644 (file)
@@ -84,7 +84,7 @@ class Shelf(collections.MutableMapping):
                  keyencoding="utf-8"):
         self.dict = dict
         if protocol is None:
-            protocol = 2
+            protocol = 3
         self._protocol = protocol
         self.writeback = writeback
         self.cache = {}
index ae32ca16636f1a2c598da88b1f9352f30c1ed1ea..204c0177bb7086a61b8de545d6d27c78298197d7 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -113,6 +113,8 @@ Library
 
 - Issue #1581476: Always use the Tcl global namespace when calling into Tcl.
 
+- The shelve module now defaults to pickle protocol 3.
+
 - Issue #2047: shutil.move() could believe that its destination path was
   inside its source path if it began with the same letters (e.g. "src" vs.
   "src.new").