Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1161 - stdout is line-buffered during command execution #1324

Merged
merged 1 commit into from Oct 26, 2022

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
2 participants