You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's been fixed in Python now, so it should be safe from Python 3.7, 3.6.2 and 3.5.4. I don't think we can easily work around it in IPython, but I'll leave this open and if more people run into it, we can look at monkeypatching inspect.
Activity
takluyver commentedon May 22, 2017
I cheerfully tried to reproduce this and then had to reboot my computer. That will teach me ;-)
My guess is that our introspection machinery clashes with the highly dynamic nature of mock objects. I'll look into it.
takluyver commentedon May 22, 2017
Gah, it's in Python itself.
inspect.getsourcelines(unittest.mock.call)is enough to trigger it. I'll file an upstream bug.takluyver commentedon May 22, 2017
In fact, there already is one: http://bugs.python.org/issue25532
takluyver commentedon May 23, 2017
It's been fixed in Python now, so it should be safe from Python 3.7, 3.6.2 and 3.5.4. I don't think we can easily work around it in IPython, but I'll leave this open and if more people run into it, we can look at monkeypatching
inspect.