Index: Lib/inspect.py =================================================================== --- Lib/inspect.py (revision 60647) +++ Lib/inspect.py (working copy) @@ -465,6 +465,8 @@ is raised if the source code cannot be retrieved.""" file = getsourcefile(object) or getfile(object) module = getmodule(object, file) + + linecache.checkcache(file) if module: lines = linecache.getlines(file, module.__dict__) else: