[issue10329] trace.py and unicode in Python 3
Alexander Belopolsky
report at bugs.python.org
Fri Nov 5 19:22:12 CET 2010
Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:
I don't think trace.diff is proposed for commit. I see it more as a supporting file for diagnosing the problem.
I see two problems here:
1. Apparently OP's system opens files with encoding set to 'ascii' by default. This is not the case on any of the systems I have access to (OSX and Linux). I will try to reproduce this issue by setting LANG="en_US.ascii".
2. Regrtest attempts to write a no-ascii character into the trace results file. I suspect this comes from test cases that test import from modules with non-ascii name or with non-ascii identifiers.
I am not sure there is anything we need to change here other than possibly skip tests that use non-ascii identifiers of the systems with default encoding set to ascii. I would be +0 on adding errors='replace' or 'backshlashreplace' to the open() call in write_results_file(), but hardcoding encoding="utf-8" is definitely not the right thing to do.
----------
stage: patch review -> unit test needed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10329>
_______________________________________
More information about the Python-bugs-list
mailing list