Issue #17810: Implement PEP 3154, pickle protocol 4. · pythoncapi/cpython@c9dc4a2 · GitHub
Skip to content

Commit c9dc4a2

Browse files
committed
Issue python#17810: Implement PEP 3154, pickle protocol 4.
Most of the work is by Alexandre.
1 parent 95401c5 commit c9dc4a2

12 files changed

Lines changed: 3123 additions & 997 deletions

File tree

Doc/library/pickle.rst

Lines changed: 26 additions & 9 deletions

Doc/whatsnew/3.4.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ New expected features for Python implementations:
109109
Significantly Improved Library Modules:
110110

111111
* Single-dispatch generic functions in :mod:`functoools` (:pep:`443`)
112+
* New :mod:`pickle` protocol 4 (:pep:`3154`)
112113
* SHA-3 (Keccak) support for :mod:`hashlib`.
113114
* TLSv1.1 and TLSv1.2 support for :mod:`ssl`.
114115
* :mod:`multiprocessing` now has option to avoid using :func:`os.fork`
@@ -285,6 +286,20 @@ described in the PEP. Existing importers should be updated to implement
285286
the new methods.
286287

287288

289+
Pickle protocol 4
290+
=================
291+
292+
The new :mod:`pickle` protocol addresses a number of issues that were present
293+
in previous protocols, such as the serialization of nested classes, very
294+
large strings and containers, or classes whose :meth:`__new__` method takes
295+
keyword-only arguments. It also brings a couple efficiency improvements.
296+
297+
.. seealso::
298+
299+
:pep:`3154` - Pickle protocol 4
300+
PEP written by Antoine Pitrou and implemented by Alexandre Vassalotti.
301+
302+
288303
Other Language Changes
289304
======================
290305

Lib/copyreg.py

Lines changed: 6 additions & 0 deletions

0 commit comments

Comments
 (0)