[Python-checkins] cpython (merge 3.5 -> default): Issue #27431: Merge from 3.5

berker.peksag python-checkins at python.org
Fri Jul 1 05:31:27 EDT 2016


https://hg.python.org/cpython/rev/908b801f8a62
changeset:   102241:908b801f8a62
parent:      102239:97b22fe37af1
parent:      102240:b2c3837f7833
user:        Berker Peksag <berker.peksag at gmail.com>
date:        Fri Jul 01 12:33:25 2016 +0300
summary:
  Issue #27431: Merge from 3.5

files:
  Doc/library/shelve.rst  |  2 +-
  Lib/test/test_shelve.py |  4 ++++
  2 files changed, 5 insertions(+), 1 deletions(-)


diff --git a/Doc/library/shelve.rst b/Doc/library/shelve.rst
--- a/Doc/library/shelve.rst
+++ b/Doc/library/shelve.rst
@@ -108,7 +108,7 @@
    A subclass of :class:`collections.abc.MutableMapping` which stores pickled
    values in the *dict* object.
 
-   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. See the
    :mod:`pickle` documentation for a discussion of the pickle protocols.
 
diff --git a/Lib/test/test_shelve.py b/Lib/test/test_shelve.py
--- a/Lib/test/test_shelve.py
+++ b/Lib/test/test_shelve.py
@@ -162,6 +162,10 @@
         else:
             self.fail('Closed shelf should not find a key')
 
+    def test_default_protocol(self):
+        with shelve.Shelf({}) as s:
+            self.assertEqual(s._protocol, 3)
+
 from test import mapping_tests
 
 class TestShelveBase(mapping_tests.BasicTestMappingProtocol):

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list