summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-07-01 09:33:25 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2016-07-01 09:33:25 (GMT)
commitcf8b42e9043766338c0b16d0dca3ed5ca70a812d (patch)
treec7e81136efb22a2a2360afa4e67b989c3414a795
parenta9e1ebb780b971079f5b43813426261bd69baf5d (diff)
parent8faca61fec8ef004feb534dee3da052f3bed82ce (diff)
downloadcpython-cf8b42e9043766338c0b16d0dca3ed5ca70a812d.zip
cpython-cf8b42e9043766338c0b16d0dca3ed5ca70a812d.tar.gz
cpython-cf8b42e9043766338c0b16d0dca3ed5ca70a812d.tar.bz2
Issue #27431: Merge from 3.5
-rw-r--r--Doc/library/shelve.rst2
-rw-r--r--Lib/test/test_shelve.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/Doc/library/shelve.rst b/Doc/library/shelve.rst
index 1ec158e..db66a63 100644
--- a/Doc/library/shelve.rst
+++ b/Doc/library/shelve.rst
@@ -108,7 +108,7 @@ Restrictions
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
index bd51d86..b71af2b 100644
--- a/Lib/test/test_shelve.py
+++ b/Lib/test/test_shelve.py
@@ -162,6 +162,10 @@ class TestCase(unittest.TestCase):
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):