Fix boundmethod not to have __dict__ + immutable type (#5851)

This commit is contained in:
Jeong, YunWon authored and GitHub committed 2025-06-27 22:50:58 +09:00
1 parent f5ccd4faed
commit 43302cec4d
2 files changed
+1 -5

No files matched your search

-4
View File
@@ -276,8 +276,6 @@ class InstancemethodAttrTest(FuncAttrsTest):
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 @@ class FunctionDictsTest(FuncAttrsTest):
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
+1 -1
View File
@@ -734,7 +734,7 @@ impl PyBoundMethod {
#[pyclass(
with(Callable, Comparable, GetAttr, Constructor, Representable),
flags(HAS_DICT)
flags(IMMUTABLETYPE)
)]
impl PyBoundMethod {
#[pymethod]