New submission from STINNER Victor <victor.stin...@haypocalc.com>: If a test fails, regrtest writes the backtrace to sys.stdout. If the backtrace contains a non-ASCII characters, it's encoded using sys.stdout encoding.
In some conditions, sys.stdout is unable to encode some or all non-ASCII characters. Eg. if there is no locale set (empty environment or at least empty LANG variable value), sys.stdout.encoding="ascii". If regrtest fails to display a test output (error backtrace), regrtest exits directly (don't execute next tests). I propose to use backslashreplace error handler in sys.stdout, as done for sys.stderr to avoid this annoying issue. Attached patch (for py3k) replace sys.stdout by a new file using backslashreplace, just before executing the tests. I don't know if the issue concerns also Python2. ---------- files: regrtest_stdout_backslashreplace.patch keywords: patch messages: 104212 nosy: haypo severity: normal status: open title: regrtest: use backslashreplace error handler for stdout versions: Python 3.1, Python 3.2 Added file: http://bugs.python.org/file17090/regrtest_stdout_backslashreplace.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8533> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com