From 3af62b98bee64bdcf99725228d6df8762409c23b Mon Sep 17 00:00:00 2001 From: Arseny Boykov <36469655+Bobronium@users.noreply.github.com> Date: Thu, 20 Nov 2025 09:57:05 +0100 Subject: [PATCH] gh-141757: Comply with pickle protocol in test_reduce_5tuple (GH-141759) The 5th element of the __reduce__ tuple should be an iterator. (cherry picked from commit 41b9ad5b38e913194a5cc88f0e7cfc096787b664) Co-authored-by: Arseny Boykov <36469655+Bobronium@users.noreply.github.com> --- Lib/test/test_copy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_copy.py b/Lib/test/test_copy.py index 3dec64cc9a2414..69a981cd14ca7b 100644 --- a/Lib/test/test_copy.py +++ b/Lib/test/test_copy.py @@ -666,7 +666,7 @@ def __eq__(self, other): 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__)