-
Notifications
You must be signed in to change notification settings - Fork 989
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 output stream failures (Windows) #4375
Fix output stream failures (Windows) #4375
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some disclaimer around the weird for
that fixes the issue
if newline: | ||
data = "%s\n" % data | ||
|
||
for _ in range(3): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this might work and fix the issue, but at least we need some kind of disclaimer for this block of code, maybe a link to the issue, an explanation, (I suppose that a test is impossible)... otherwise anyone having a look at this hack may delete it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jgsogo may be it's possible to mock self._stream.write
in test, so it throws an error 3 times?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comments and a test patching the stream.write.
Changelog: Fix: Implemented retrial of output to stdout stream when the OS (Windows) is holding it and producing IOError for output
Docs: Omit
Close #4277