[issue32797] Tracebacks from Cython modules no longer work

Jeroen Demeyer report at bugs.python.org
Tue May 1 13:31:39 EDT 2018


Jeroen Demeyer <J.Demeyer at UGent.be> added the comment:

> How does CPython display the source for tracebacks in Cython modules?

Do you mean the "python" command-line program? That uses a different algorithm: to find a file FOO, it searches

[os.path.join(p, os.path.basename(FOO)) for p in sys.path]

This is completely broken because it ignores all leading path components of FOO. So it will only work if your file is in the root of your package, not in a subdirectory.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32797>
_______________________________________


More information about the Python-bugs-list mailing list