mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
The default shelve pickle protocol should have been 3.
This commit is contained in:
parent
f6e18066be
commit
85602268dc
3 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 = {}
|
||||
|
|
|
|||
|
|
@ -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().
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue