https://github.com/python/cpython/commit/daf98fe5bd85e05c4cffd0a7d2047d8938ea8846
commit: daf98fe5bd85e05c4cffd0a7d2047d8938ea8846
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2025-11-20T09:22:52Z
summary:

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

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

Co-authored-by: Arseny Boykov <[email protected]>

files:
M Lib/test/test_copy.py

diff --git a/Lib/test/test_copy.py b/Lib/test/test_copy.py
index 467ec09d99e462..cfef24727e8c82 100644
--- a/Lib/test/test_copy.py
+++ b/Lib/test/test_copy.py
@@ -672,7 +672,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__)

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to