]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-46615: Don't crash when set operations mutate the sets (GH-31120) (GH-31312)
authorDennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
Sun, 13 Feb 2022 10:29:42 +0000 (05:29 -0500)
committerGitHub <noreply@github.com>
Sun, 13 Feb 2022 10:29:42 +0000 (12:29 +0200)
commitc31b8a97a8a7e8255231c9e12ed581c6240c0d6c
tree2814feb4775869a83f43c273d1c33c60268316b9
parentebe73e6095fc019fd1e31c9f41bc67d56ee003b6
bpo-46615: Don't crash when set operations mutate the sets (GH-31120) (GH-31312)

Ensure strong references are acquired whenever using `set_next()`. Added randomized test cases for `__eq__` methods that sometimes mutate sets when called.

(cherry picked from commit 4a66615ba736f84eadf9456bfd5d32a94cccf117)
Lib/test/test_set.py
Misc/NEWS.d/next/Core and Builtins/2022-02-04-04-33-18.bpo-46615.puArY9.rst [new file with mode: 0644]
Objects/setobject.c