Skip to content

Conversation

@joerick
Copy link
Contributor

@joerick joerick commented Oct 21, 2022

Fix #1161 - making stdout line-buffered.

I can't think how to add a unit test for this because capfd keeps stdout and stderr separately. But on my machine, this-

python -m test.test_projects test.test_0_basic.basic_project /tmp/basic_project
(cd /tmp/basic_project && CIBW_BEFORE_BUILD="python -uc 'import sys, time; print(1, file=sys.stdout); time.sleep(0.1); print(2, file=sys.stderr)'" cibuildwheel --platform linux)

Prints

2
1

before this PR and ...

1
2

after.

Copy link
Contributor

@henryiii henryiii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be no harm, so maybe let's get this in before release?

@joerick joerick merged commit 89a8cac into main Oct 26, 2022
@joerick joerick deleted the stderr-interleaving branch October 26, 2022 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stderr on docker run at the top

3 participants