From 4c035a441b5cb1db62c796650fb4ceea46174c2d Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Tue, 24 Nov 2020 18:48:27 +0000 Subject: [PATCH] Try using an Unbuffered sys.stderr --- cibuildwheel/__main__.py | 1 + cibuildwheel/docker_container.py | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py index e171ab20..3ec57195 100644 --- a/cibuildwheel/__main__.py +++ b/cibuildwheel/__main__.py @@ -220,6 +220,7 @@ def main() -> None: # Python is buffering by default when running on the CI platforms, giving problems interleaving subprocess call output with unflushed calls to 'print' sys.stdout = Unbuffered(sys.stdout) # type: ignore + sys.stderr = Unbuffered(sys.stderr) # type: ignore print_preamble(platform, build_options) diff --git a/cibuildwheel/docker_container.py b/cibuildwheel/docker_container.py index 7511f9e0..a58eb750 100644 --- a/cibuildwheel/docker_container.py +++ b/cibuildwheel/docker_container.py @@ -57,9 +57,6 @@ class DockerContainer: ], stdin=subprocess.PIPE, stdout=subprocess.PIPE, - # output the subcommand stderr to our stdout. Avoids ordering - # problems between log messages on stderr and stdout - stderr=sys.stdout, ) assert self.process.stdin and self.process.stdout