[issue8533] regrtest: use backslashreplace error handler for stdout

2011-05-30 Thread STINNER Victor
STINNER Victor added the comment: The original issue (use backslashreplace for stdout in regrtest) is now fixed, and so I closed it. @ocean-city: Can you please open a new issue for unittest? (for py3k_also_no_unicode_error_on_direct_test_run.patch) -- resolution: -> fixed status: o

[issue8533] regrtest: use backslashreplace error handler for stdout

2011-05-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8be9eaf5829f by Victor Stinner in branch 'default': Issue #8533: regrtest replaces also sys.stdout on Windows http://hg.python.org/cpython/rev/8be9eaf5829f -- nosy: +python-dev ___ Python tracker

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-12-08 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Well, can this go into Python3.2? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-10-11 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Thank you. I'll reattach the patch only for Lib/unittest/runner.py -- Added file: http://bugs.python.org/file19191/py3k_also_no_unicode_error_on_direct_test_run.patch ___ Python tracker

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-10-11 Thread STINNER Victor
STINNER Victor added the comment: > Oops, sorry. I'll withdraw my last patch. Why? Your patch is useful to run a single test outside regrtest. But you should not remove the hack on regrtest.py, only keep your patch on unittest/runner.py. There are not exclusive. -- _

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-10-09 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file19170/py3k_also_no_unicode_error_on_direct_test_run.patch ___ Python tracker ___ _

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Oops, sorry. I'll withdraw my last patch. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-10-09 Thread STINNER Victor
STINNER Victor added the comment: py3k_also_no_unicode_error_on_direct_test_run.patch comes a little bit too late: $ LANG= ./python Lib/test/regrtest.py -v test_time == CPython 3.2a2+ (py3k, Oct 8 2010, 01:40:20) [GCC 4.4.5 20100909 (prerelease)] == Linux-2.6.32-trunk-686-i686-with-debian-squ

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I noticed fd must be dup-ed before passing to io.open. And I noticed direct test run like "py3k -m test.test_time" still produces unicode error. (Maybe this is reasonable limitation) I can confirm we can suppress the unicode error in such case with newly att

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-09-10 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: And here is more advanced (?) patch. More closer to Python/pythonrun.c 's implementaion. I tried regrtest_stdout_newline.patch, but it doesn't work. # AttributeError: '_io.TextIOWrapper' object has no attribute '_writenl' -- Added file: http://bugs.

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-09-10 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Hello. How about this patch? I just mimicked create_stdio() in Python/pythonrun.c. (Mostly) Newlines looks correct as well as python2.x. I tested this on windows. -- nosy: +ocean-city Added file: http://bugs.python.org/file18824/py3k_regrtest_newline

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-05-06 Thread STINNER Victor
STINNER Victor added the comment: I disabled my patch (replace_stdout function) on Windows until it gets fixed: r80905 (py3k) and r80906 (3.1) -- ___ Python tracker ___

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-05-05 Thread STINNER Victor
STINNER Victor added the comment: Reopen: r80703 (and r80711) introduces a new bug: on Windows, there is an empty string between each line. It looks like a newline error. replace_stdout() should set the newline argument to open(). But how can I get the newline attribute from sys.stdout? sys.s

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-05-03 Thread STINNER Victor
STINNER Victor added the comment: > Let's try: r80703 This one looks ok: the output order is kept and I didn't noticed anything special in the buildbot output. Backported to 3.1 as r80711. Close the issue. -- resolution: -> fixed status: open -> closed _

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-05-02 Thread STINNER Victor
STINNER Victor added the comment: 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 o

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-05-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Since it may reorder output, I think it's better revert the patch and try the other solution. However, I don't think you need to replace sys.stdout at all: just output the traceback more carefully. -- status: pending -> open _

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-05-02 Thread STINNER Victor
STINNER Victor added the comment: Ok, let's try sys.stderr solution: commited in r80694 (py3k). If it breaks buildbot outputs, I will revert it and try the second solution. -- status: open -> pending ___ Python tracker

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-04-30 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file17093/regrtest_traceback_stderr.patch ___ Python tracker ___ ___ Python-bu

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-04-30 Thread STINNER Victor
STINNER Victor added the comment: regrtest_traceback_stderr.patch is not enough: support._run_suite() writes output to sys.stdout instead of sys.stderr. New version of the patch fixes that. -- Added file: http://bugs.python.org/file17152/regrtest_traceback_stderr-2.patch _

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-04-26 Thread STINNER Victor
STINNER Victor added the comment: Write to stderr instead of stdout might change buildbot output order. -- ___ Python tracker ___ ___

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-04-26 Thread STINNER Victor
STINNER Victor added the comment: > A better resolution IMO would be to output tracebacks on stderr instead. Yeah, that sounds easier and safer. Attached patch writes the tracebacks to stderr. I don't remember how to reproduce this issue :-/ I guess that stdout/stderr encoding should be ASCI

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-04-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: A better resolution IMO would be to output tracebacks on stderr instead. -- nosy: +flox, pitrou ___ Python tracker ___ _

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-04-26 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Tests, Unicode ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-04-26 Thread STINNER Victor
New submission from STINNER Victor : 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 l