Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment:
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] ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36593> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com