From: Arseny Boykov <36469655+Bobronium@users.noreply.github.com> Date: Thu, 20 Nov 2025 08:57:05 +0000 (+0100) Subject: gh-141757: Comply with pickle protocol in test_reduce_5tuple (GH-141759) X-Git-Tag: v3.15.0a3~341 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41b9ad5b38e913194a5cc88f0e7cfc096787b664;p=thirdparty%2FPython%2Fcpython.git gh-141757: Comply with pickle protocol in test_reduce_5tuple (GH-141759) The 5th element of the __reduce__ tuple should be an iterator. --- diff --git a/Lib/test/test_copy.py b/Lib/test/test_copy.py index 467ec09d99e4..cfef24727e8c 100644 --- a/Lib/test/test_copy.py +++ b/Lib/test/test_copy.py @@ -672,7 +672,7 @@ class TestCopy(unittest.TestCase): def test_reduce_5tuple(self): class C(dict): def __reduce__(self): - return (C, (), self.__dict__, None, self.items()) + return (C, (), self.__dict__, None, iter(self.items())) def __eq__(self, other): return (dict(self) == dict(other) and self.__dict__ == other.__dict__)