gh-141757: Comply with pickle protocol in test_reduce_5tuple (GH-141759)

The 5th element of the __reduce__ tuple should be an iterator.
This commit is contained in:
Arseny Boykov 2025-11-20 09:57:05 +01:00 committed by GitHub
parent e265ce8a56
commit 41b9ad5b38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -672,7 +672,7 @@ def __eq__(self, other):
def test_reduce_5tuple(self): def test_reduce_5tuple(self):
class C(dict): class C(dict):
def __reduce__(self): def __reduce__(self):
return (C, (), self.__dict__, None, self.items()) return (C, (), self.__dict__, None, iter(self.items()))
def __eq__(self, other): def __eq__(self, other):
return (dict(self) == dict(other) and return (dict(self) == dict(other) and
self.__dict__ == other.__dict__) self.__dict__ == other.__dict__)