Skip to content

Commit 41b9ad5

Browse files
authored
gh-141757: Comply with pickle protocol in test_reduce_5tuple (GH-141759)
The 5th element of the __reduce__ tuple should be an iterator.
1 parent e265ce8 commit 41b9ad5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_copy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ def __eq__(self, other):
672672
def test_reduce_5tuple(self):
673673
class C(dict):
674674
def __reduce__(self):
675-
return (C, (), self.__dict__, None, self.items())
675+
return (C, (), self.__dict__, None, iter(self.items()))
676676
def __eq__(self, other):
677677
return (dict(self) == dict(other) and
678678
self.__dict__ == other.__dict__)

0 commit comments

Comments
 (0)