diff --git a/Lib/test/test_funcattrs.py b/Lib/test/test_funcattrs.py index 6f6e1317dc..5fd268fd90 100644 --- a/Lib/test/test_funcattrs.py +++ b/Lib/test/test_funcattrs.py @@ -276,8 +276,6 @@ def test___self__(self): self.assertEqual(self.fi.a.__self__, self.fi) self.cannot_set_attr(self.fi.a, "__self__", self.fi, AttributeError) - # TODO: RUSTPYTHON - @unittest.expectedFailure def test___func___non_method(self): # Behavior should be the same when a method is added via an attr # assignment @@ -331,8 +329,6 @@ def test_setting_dict_to_invalid(self): d = UserDict({'known_attr': 7}) self.cannot_set_attr(self.fi.a.__func__, '__dict__', d, TypeError) - # TODO: RUSTPYTHON - @unittest.expectedFailure def test_setting_dict_to_valid(self): d = {'known_attr': 7} self.b.__dict__ = d diff --git a/vm/src/builtins/function.rs b/vm/src/builtins/function.rs index 4cd2b8604f..ae4784079c 100644 --- a/vm/src/builtins/function.rs +++ b/vm/src/builtins/function.rs @@ -734,7 +734,7 @@ impl PyBoundMethod { #[pyclass( with(Callable, Comparable, GetAttr, Constructor, Representable), - flags(HAS_DICT) + flags(IMMUTABLETYPE) )] impl PyBoundMethod { #[pymethod]