]> granicus.if.org Git - python/commitdiff
Merged revisions 80905 via svnmerge from
authorVictor Stinner <victor.stinner@haypocalc.com>
Fri, 7 May 2010 00:58:26 +0000 (00:58 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Fri, 7 May 2010 00:58:26 +0000 (00:58 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r80905 | victor.stinner | 2010-05-07 02:57:12 +0200 (ven., 07 mai 2010) | 4 lines

  regrtest.py: disable replace_stdout() on Windows until it is fixed

  See issue #8533 (problem with newlines on Windows).
........

Lib/test/regrtest.py

index 5eea1d996c067c279c4ff4809b83e8e83aef97e2..30792c2f6641595ae5e635335ec1489ec3269a5c 100755 (executable)
@@ -560,6 +560,9 @@ def findtests(testdir=None, stdtests=STDTESTS, nottests=NOTTESTS):
 def replace_stdout():
     """Set stdout encoder error handler to backslashreplace (as stderr error
     handler) to avoid UnicodeEncodeError when printing a traceback"""
+    if os.name == "nt":
+        # Replace sys.stdout breaks the stdout newlines on Windows: issue #8533
+        return
     stdout = sys.stdout
     sys.stdout = open(stdout.fileno(), 'w',
         encoding=stdout.encoding,