From a52948e88ed60597407a285ed83e5d9dd5af5250 Mon Sep 17 00:00:00 2001 From: Carlton Gibson Date: Fri, 5 Jun 2020 10:56:18 +0200 Subject: [PATCH] Updated DEFAULT_PROTOCOL to 3. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > Protocol version 3 was added in Python 3.0. It has explicit support for bytes objects and cannot be unpickled by Python 2.x. This was the default protocol in Python 3.0–3.7. --- README.rst | 2 ++ picklefield/constants.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 577c39e..a824013 100644 --- a/README.rst +++ b/README.rst @@ -166,6 +166,8 @@ UNRELEASED ========== * Dropped support for Python 2. +* Updated default pickle protocol to version 3. + Changes in version 2.1.0 ======================== diff --git a/picklefield/constants.py b/picklefield/constants.py index d3c1743..e8232d2 100644 --- a/picklefield/constants.py +++ b/picklefield/constants.py @@ -1,3 +1,3 @@ from __future__ import unicode_literals -DEFAULT_PROTOCOL = 2 +DEFAULT_PROTOCOL = 3