Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment: There are very few changes to mock.py on bisecting with the example in the report is d358a8cda75446a8e0b5d99149f709395d5eae19 the problem? I am surprised by the reason this commit leads to change in behavior with set trace.
➜ cpython git:(master) ✗ cat ../backups/bpo36593.py import sys def trace(frame, event, arg): return trace if len(sys.argv) > 1: sys.settrace(trace) from unittest.mock import MagicMock class A: pass m = MagicMock(spec=A) print("isinstance: ", isinstance(m, A)) ➜ cpython git:(master) ✗ git checkout d358a8cda75446a8e0b5d99149f709395d5eae19 Lib/unittest/mock.py ➜ cpython git:(master) ✗ ./python.exe ../backups/bpo36593.py 1 isinstance: False ➜ cpython git:(master) ✗ git checkout d358a8cda75446a8e0b5d99149f709395d5eae19~1 Lib/unittest/mock.py ➜ cpython git:(master) ✗ ./python.exe ../backups/bpo36593.py 1 isinstance: True commit d358a8cda75446a8e0b5d99149f709395d5eae19 Author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com> Date: Mon Jan 21 01:37:54 2019 -0800 bpo-20239: Allow repeated deletion of unittest.mock.Mock attributes (GH-11629) * Allow repeated deletion of unittest.mock.Mock attributes * fixup! Allow repeated deletion of unittest.mock.Mock attributes * fixup! fixup! Allow repeated deletion of unittest.mock.Mock attributes (cherry picked from commit 222d303ade8aadf0adcae5190fac603bdcafe3f0) Co-authored-by: Pablo Galindo <pablog...@gmail.com> ---------- nosy: +pablogsal _______________________________________ 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