Kevin Benton added the comment:
I like the idea of having the new module functions without deprecating the old
ones. Then projects can encourage use of the API on their own terms. Maybe
there could even be a global that projects could set that would disable the
object methods
Kevin Benton added the comment:
What about other methods/properties like called, call_count, and reset_mock? It
seems that they should be removed as well to be consistent with the reason for
this change.
--
nosy: +kevinbenton
___
Python tracker
New submission from Kevin Benton:
If one of the mock.patch methods is used with autospec=True on a staticmethod
in an object, the mock library determines that it is not callable by checking
for the __call__ attribute. This results in a NonCallableMagicMock being
returned which of course dies