Fix spying on objects with a custom __setattr__.
Review Request #10073 — Created July 9, 2018 and submitted
Objects with a custom
__setattr__could impact spies, if they don't
fall back to the default behavior. In some cases, we attempt to set a
cloned method on an instance, and this triggered
sometimes losing that spy and leading to various sorts of failures.
We now explicitly call the default
which ensures we're setting the value in the instance's dictionary
instead of triggering the subclass. This is effectively what
would do by default.
Ran unit tests on all supported Python versions. They failed prior to the
fix, but ran successfully after.
Hit this issue during development on another project. Verified that the
problems went away after the fix.