Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cf8b42e

Browse files
committed
Issue #27431: Merge from 3.5
2 parents a9e1ebb + 8faca61 commit cf8b42e

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

Doc/library/shelve.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Restrictions
108108
A subclass of :class:`collections.abc.MutableMapping` which stores pickled
109109
values in the *dict* object.
110110

111-
By default, version 0 pickles are used to serialize values. The version of the
111+
By default, version 3 pickles are used to serialize values. The version of the
112112
pickle protocol can be specified with the *protocol* parameter. See the
113113
:mod:`pickle` documentation for a discussion of the pickle protocols.
114114

Lib/test/test_shelve.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,10 @@ def test_with(self):
162162
else:
163163
self.fail('Closed shelf should not find a key')
164164

165+
def test_default_protocol(self):
166+
with shelve.Shelf({}) as s:
167+
self.assertEqual(s._protocol, 3)
168+
165169
from test import mapping_tests
166170

167171
class TestShelveBase(mapping_tests.BasicTestMappingProtocol):

0 commit comments

Comments
 (0)