]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-90494: Reject 6th element of the __reduce__() tuple (GH-93609)
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 9 Jun 2022 07:12:43 +0000 (10:12 +0300)
committerGitHub <noreply@github.com>
Thu, 9 Jun 2022 07:12:43 +0000 (10:12 +0300)
commita365dd64c2a1f0d142540d5031003f24986f489f
tree136b63bf5621d9289baae429f2221dfed2c9558c
parentcffa4f7854eb11e21c25026b24e9ccd14763c8d3
gh-90494: Reject 6th element of the __reduce__() tuple (GH-93609)

copy.copy() and copy.deepcopy() now always raise a TypeError if
__reduce__() returns a tuple with length 6 instead of silently ignore
the 6th item or produce incorrect result.
Lib/copy.py
Lib/pickle.py
Lib/test/test_copy.py
Misc/NEWS.d/next/Library/2022-06-08-20-11-02.gh-issue-90494.LIZT85.rst [new file with mode: 0644]