[Python-checkins] r69249 - in python/branches/py3k: Doc/library/shelve.rst Lib/shelve.py Misc/NEWS

raymond.hettinger python-checkins at python.org
Tue Feb 3 05:19:10 CET 2009


Author: raymond.hettinger
Date: Tue Feb  3 05:19:10 2009
New Revision: 69249

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

Modified:
   python/branches/py3k/Doc/library/shelve.rst
   python/branches/py3k/Lib/shelve.py
   python/branches/py3k/Misc/NEWS

Modified: python/branches/py3k/Doc/library/shelve.rst
==============================================================================
--- python/branches/py3k/Doc/library/shelve.rst	(original)
+++ python/branches/py3k/Doc/library/shelve.rst	Tue Feb  3 05:19:10 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 2 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/py3k/Lib/shelve.py
==============================================================================
--- python/branches/py3k/Lib/shelve.py	(original)
+++ python/branches/py3k/Lib/shelve.py	Tue Feb  3 05:19:10 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/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS	(original)
+++ python/branches/py3k/Misc/NEWS	Tue Feb  3 05:19:10 2009
@@ -157,6 +157,8 @@
 
 - Issue #1581476: Always use the Tcl global namespace when calling into Tcl.
 
+- The shelve module now defaults to pickle protocol 3.
+
 - Fix a bug in the trace module where a bytes object from co_lnotab had its
   items being passed through ord().
 


More information about the Python-checkins mailing list