[issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header
STINNER Victor
report at bugs.python.org
Sat Sep 27 17:27:30 CEST 2008
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
Ooops, my first version introduces a regression: if file open fails,
the traceback printing was stopped. Here is a new version of my patch
to support #coding: header in _Py_DisplaySourceLine(). It doesn't
print the line of file open fails, but continue to display the end of
the traceback.
But print still stops on PyFile_WriteObject() or PyFile_WriteString().
If PyFile fails, I guess that next print will also fails. (it's also
the current behaviour of PyTraceBack_Print).
Example:
----
Python 3.0rc1+ (py3k:66643M, Sep 27 2008, 17:11:51)
>>> raise Exception('err')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
Exception: err
----
The line is not displayed (why? no idea), but the exception
("Exception: err") is still displayed.
Added file: http://bugs.python.org/file11633/traceback_unicode-2.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3975>
_______________________________________
More information about the Python-bugs-list
mailing list