This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2010-04-26.10:43:11
SpamBayes Score 1.3062276e-08
Marked as misclassified No
Message-id <1272278593.97.0.387479540648.issue8533@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-04-26 10:43:14vstinnersetrecipients: + vstinner
2010-04-26 10:43:13vstinnersetmessageid: <1272278593.97.0.387479540648.issue8533@psf.upfronthosting.co.za>
2010-04-26 10:43:12vstinnerlinkissue8533 messages
2010-04-26 10:43:11vstinnercreate