Message339909
On an initial guess this is the change that went through and using object.__delattr__(self, name) instead of super().__delattr__(name) restores the old behavior and there are no test case failures. But I still have to check the change and how it's related to set trace.
diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py
index 955af5d2b8..42fbc22e74 100644
--- a/Lib/unittest/mock.py
+++ b/Lib/unittest/mock.py
@@ -728,11 +728,10 @@ class NonCallableMock(Base):
# not set on the instance itself
return
- if name in self.__dict__:
- object.__delattr__(self, name)
-
obj = self._mock_children.get(name, _missing)
- if obj is _deleted:
+ if name in self.__dict__:
+ super().__delattr__(name)
+ elif obj is _deleted:
raise AttributeError(name)
if obj is not _missing:
del self._mock_children[name] |
|
Date |
User |
Action |
Args |
2019-04-11 00:30:28 | xtreak | set | recipients:
+ xtreak, nedbat, pablogsal |
2019-04-11 00:30:28 | xtreak | set | messageid: <1554942628.57.0.616952219107.issue36593@roundup.psfhosted.org> |
2019-04-11 00:30:28 | xtreak | link | issue36593 messages |
2019-04-11 00:30:28 | xtreak | create | |
|