From eb27a881218a9a3d6671bf6f0756d944de4c004d Mon Sep 17 00:00:00 2001 From: ShaharNaveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Sat, 19 Jul 2025 17:16:33 +0200 Subject: [PATCH 1/2] Update `_weakrefset` from 3.13.5 --- Lib/_weakrefset.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Lib/_weakrefset.py b/Lib/_weakrefset.py index 2a27684324d..489eec714e0 100644 --- a/Lib/_weakrefset.py +++ b/Lib/_weakrefset.py @@ -80,8 +80,7 @@ def __contains__(self, item): return wr in self.data def __reduce__(self): - return (self.__class__, (list(self),), - getattr(self, '__dict__', None)) + return self.__class__, (list(self),), self.__getstate__() def add(self, item): if self._pending_removals: From fe81e885c51053970a10ee4dfe57584a08fc0278 Mon Sep 17 00:00:00 2001 From: ShaharNaveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Sat, 19 Jul 2025 18:12:54 +0200 Subject: [PATCH 2/2] Update `test_weakset.py` from 3.13.5 --- Lib/test/test_weakset.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Lib/test/test_weakset.py b/Lib/test/test_weakset.py index 6c4cb05a5ff..5e8cacc09dc 100644 --- a/Lib/test/test_weakset.py +++ b/Lib/test/test_weakset.py @@ -44,7 +44,7 @@ def setUp(self): def test_methods(self): weaksetmethods = dir(WeakSet) for method in dir(set): - if method == 'test_c_api' or method.startswith('_'): + if method.startswith('_'): continue self.assertIn(method, weaksetmethods, "WeakSet missing method " + method) @@ -458,8 +458,6 @@ def test_abc(self): self.assertIsInstance(self.s, Set) self.assertIsInstance(self.s, MutableSet) - # TODO: RUSTPYTHON - @unittest.expectedFailure def test_copying(self): for cls in WeakSet, WeakSetWithSlots: s = cls(self.items)