summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorRodrigo Oliveira <mdkcore@qtrnn.io>2024-07-19 14:47:10 (GMT)
committerGitHub <noreply@github.com>2024-07-19 14:47:10 (GMT)
commitd66b06107b0104af513f664d9a5763216639018b (patch)
tree0d685141aab96a59814a4c9acbe455649d215a3b /Doc/library
parenta1df1b44394784721239615f307b273455536d14 (diff)
downloadcpython-d66b06107b0104af513f664d9a5763216639018b.zip
cpython-d66b06107b0104af513f664d9a5763216639018b.tar.gz
cpython-d66b06107b0104af513f664d9a5763216639018b.tar.bz2
gh-118830: Bump pickle.DEFAULT_PROTOCOL to 5 (GH-119340)
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/pickle.rst17
1 files changed, 12 insertions, 5 deletions
diff --git a/Doc/library/pickle.rst b/Doc/library/pickle.rst
index 57fbe5b..71fe374 100644
--- a/Doc/library/pickle.rst
+++ b/Doc/library/pickle.rst
@@ -156,13 +156,14 @@ to read the pickle produced.
* Protocol version 4 was added in Python 3.4. It adds support for very large
objects, pickling more kinds of objects, and some data format
- optimizations. It is the default protocol starting with Python 3.8.
+ optimizations. This was the default protocol in Python 3.8--3.13.
Refer to :pep:`3154` for information about improvements brought by
protocol 4.
* Protocol version 5 was added in Python 3.8. It adds support for out-of-band
- data and speedup for in-band data. Refer to :pep:`574` for information about
- improvements brought by protocol 5.
+ data and speedup for in-band data. It is the default protocol starting with
+ Python 3.14. Refer to :pep:`574` for information about improvements brought
+ by protocol 5.
.. note::
Serialization is a more primitive notion than persistence; although
@@ -199,8 +200,10 @@ The :mod:`pickle` module provides the following constants:
An integer, the default :ref:`protocol version <pickle-protocols>` used
for pickling. May be less than :data:`HIGHEST_PROTOCOL`. Currently the
- default protocol is 4, first introduced in Python 3.4 and incompatible
- with previous versions.
+ default protocol is 5, introduced in Python 3.8 and incompatible
+ with previous versions. This version introduces support for out-of-band
+ buffers, where :pep:`3118`-compatible data can be transmitted separately
+ from the main pickle stream.
.. versionchanged:: 3.0
@@ -210,6 +213,10 @@ The :mod:`pickle` module provides the following constants:
The default protocol is 4.
+ .. versionchanged:: 3.14
+
+ The default protocol is 5.
+
The :mod:`pickle` module provides the following functions to make the pickling
process more convenient: