[3.13] gh-141757: Comply with pickle protocol in test_reduce_5tuple (GH-141759) (GH-141783)

The 5th element of the __reduce__ tuple should be an iterator.
(cherry picked from commit 41b9ad5b38)

Co-authored-by: Arseny Boykov <36469655+Bobronium@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2025-11-20 10:20:00 +01:00 committed by GitHub
parent 2ebe685702
commit fd1e3fe15f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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__)