[Python-checkins] r69248 - in python/branches/release30-maint: Doc/library/shelve.rst Lib/shelve.py Misc/NEWS

raymond.hettinger python-checkins at python.org
Tue Feb 3 05:16:34 CET 2009


Author: raymond.hettinger
Date: Tue Feb  3 05:16:34 2009
New Revision: 69248

Log:
The default shelve pickle protocol should have been 3.

Modified:
   python/branches/release30-maint/Doc/library/shelve.rst
   python/branches/release30-maint/Lib/shelve.py
   python/branches/release30-maint/Misc/NEWS

Modified: python/branches/release30-maint/Doc/library/shelve.rst
==============================================================================
--- python/branches/release30-maint/Doc/library/shelve.rst	(original)
+++ python/branches/release30-maint/Doc/library/shelve.rst	Tue Feb  3 05:16:34 2009
@@ -23,7 +23,7 @@
    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

Modified: python/branches/release30-maint/Lib/shelve.py
==============================================================================
--- python/branches/release30-maint/Lib/shelve.py	(original)
+++ python/branches/release30-maint/Lib/shelve.py	Tue Feb  3 05:16:34 2009
@@ -84,7 +84,7 @@
                  keyencoding="utf-8"):
         self.dict = dict
         if protocol is None:
-            protocol = 2
+            protocol = 3
         self._protocol = protocol
         self.writeback = writeback
         self.cache = {}

Modified: python/branches/release30-maint/Misc/NEWS
==============================================================================
--- python/branches/release30-maint/Misc/NEWS	(original)
+++ python/branches/release30-maint/Misc/NEWS	Tue Feb  3 05:16:34 2009
@@ -113,6 +113,8 @@
 
 - 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").


More information about the Python-checkins mailing list