diff options
Diffstat (limited to 'Lib/shelve.py')
| -rw-r--r-- | Lib/shelve.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/shelve.py b/Lib/shelve.py index 5d443a0fa8..e053c39734 100644 --- a/Lib/shelve.py +++ b/Lib/shelve.py @@ -56,7 +56,7 @@ entries in the cache, and empty the cache (d.sync() also synchronizes the persistent dictionary on disk, if feasible). """ -from pickle import Pickler, Unpickler +from pickle import DEFAULT_PROTOCOL, Pickler, Unpickler from io import BytesIO import collections.abc @@ -85,7 +85,7 @@ class Shelf(collections.abc.MutableMapping): keyencoding="utf-8"): self.dict = dict if protocol is None: - protocol = 3 + protocol = DEFAULT_PROTOCOL self._protocol = protocol self.writeback = writeback self.cache = {} |
