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 flox, pitrou, vstinner
Date 2010-05-02.17:25:46
SpamBayes Score 2.3389902e-07
Marked as misclassified No
Message-id <1272821148.8.0.0599395943887.issue8533@psf.upfronthosting.co.za>
In-reply-to
Content
As "expected", the patch doesn't work: it randomize the output order :-(

I checked "sparc Ubuntu 3.x": the output order is correct. "test_xxx" lines are written to stdout, "FAIL: ..." + traceback are written to stderr, and the lines are written in the right order.

But it failed on "x86 Tiger 3.x" :
http://www.python.org/dev/buildbot/3.x/builders/x86 Tiger 3.x/builds/130/steps/test/logs/stdio
http://www.python.org/dev/buildbot/3.x/builders/x86 Tiger 3.x/builds/131/steps/test/logs/stdio

When a test is reexecuted in verbose mode, the output is written in red (why not, but it was not the case before my commit), and the stdout and stderr are in a "mixed".

--

antoine> just output the traceback more carefully.

Encode the traceback by hand would be possible, but it's more complex. A possible solution would be to write the output to a StringIO, encode unicode to bytes using the right encoding and backslashreplace error handler, and write the result to stdout. But I don't like buffering the output because the buildbot may hung for different reasons (search in the bug tracker for "test_multiprocessing" or "test_subprocess"...) and the buildbot master may consider the buildbot as dead (no new output since xxx seconds, whereas it's writing to a buffer).

--

I prefer my first simple idea: use backslashreplace error handler for stdout. Let's try: r80703. This commit reverts my previous commit, apply regrtest_stdout_backslashreplace.patch + a fix for multiprocessing mode (regrtest.py -j ...).
History
Date User Action Args
2010-05-02 17:25:48vstinnersetrecipients: + vstinner, pitrou, flox
2010-05-02 17:25:48vstinnersetmessageid: <1272821148.8.0.0599395943887.issue8533@psf.upfronthosting.co.za>
2010-05-02 17:25:47vstinnerlinkissue8533 messages
2010-05-02 17:25:46vstinnercreate