]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-125767: Fix pickling and copying of super objects (GH-125781)
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 21 Oct 2024 18:30:45 +0000 (21:30 +0300)
committerGitHub <noreply@github.com>
Mon, 21 Oct 2024 18:30:45 +0000 (21:30 +0300)
commit5ca4e34bc1aab8321911aac6d5b2b9e75ff764d8
treed4f4dc4e80de809d695247c749a3ac50340ef78e
parentde5a6c7c7d00ac37d66cba9849202b374e9cdfb7
gh-125767: Fix pickling and copying of super objects (GH-125781)

Previously, copying a super object returned a copy of the instance
invoking super(). Pickling a super object could pickle the instance
invoking super() or fail, depending on its type and protocol.

Now deep copying returns a new super object and pickling pickles the super
object. Shallow copying returns the same super object.
Doc/library/functions.rst
Doc/whatsnew/3.14.rst
Lib/copy.py
Lib/copyreg.py
Lib/test/test_super.py
Misc/NEWS.d/next/Library/2024-10-21-13-52-37.gh-issue-125767.0kK4lX.rst [new file with mode: 0644]