summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-02-03 04:19:10 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-02-03 04:19:10 (GMT)
commit85602268dc9d57b8965b619dd313868ebe4b9b8f (patch)
tree2f154eb4bdc4f7d2492491e7ff0e71798cdfca29
parentf6e18066be2d8e60ee46b103ebd89124a62fac32 (diff)
downloadcpython-85602268dc9d57b8965b619dd313868ebe4b9b8f.zip
cpython-85602268dc9d57b8965b619dd313868ebe4b9b8f.tar.gz
cpython-85602268dc9d57b8965b619dd313868ebe4b9b8f.tar.bz2
The default shelve pickle protocol should have been 3.
-rw-r--r--Doc/library/shelve.rst2
-rw-r--r--Lib/shelve.py2
-rw-r--r--Misc/NEWS2
3 files changed, 4 insertions, 2 deletions
diff --git a/Doc/library/shelve.rst b/Doc/library/shelve.rst
index b39a92c..44eff59 100644
--- a/Doc/library/shelve.rst
+++ b/Doc/library/shelve.rst
@@ -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 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
diff --git a/Lib/shelve.py b/Lib/shelve.py
index cf6dac6..fb2fa93 100644
--- a/Lib/shelve.py
+++ b/Lib/shelve.py
@@ -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 = {}
diff --git a/Misc/NEWS b/Misc/NEWS
index 5426046..68cea16 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -157,6 +157,8 @@ Library
- 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().