[issue2384] [Py3k] line number is wrong after encoding declaration

STINNER Victor report at bugs.python.org
Fri Sep 26 14:51:42 CEST 2008


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

ocean-city testcase is invalid: it uses subprocess.call() which 
returns the exit code, not the Python error line number! Here is a 
better testcase using subprocess.Popen() checking the line number but 
also the display line. It tests ASCII, UTF-8 and GBK charsets. Using 
GBK charset, you get the bug described by ocean-city (problem with 
multibyte charset). My testcase takes also care of script with # 
coding at the second line.

Added file: http://bugs.python.org/file11609/test_traceback-gbk.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2384>
_______________________________________


More information about the Python-bugs-list mailing list