ipython/ipython — pull request #7017 by jdemeyer (2014-11-22 23:24:51+00:00)
Title: Fix filename handling in IPython tracebacks

* Only replace filename by the value of __file__ if the latter is an
existing text file (this fixes tracebacks for Cython files).
* When making a relative filename absolute, try to make it absolute
w.r.t. the sys.path entries instead of the current working directory.
* Still try to display source lines for binary files, you never know
what linecache got from that file. Skip only the reading of names,
but display the traceback as usual.

See also downstream Sage ticket
http://trac.sagemath.org/ticket/17382