Skip to content

bpo-13601: Mention stderr's line buffering in What's New #20168

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

Merged
merged 1 commit into from
May 18, 2020

Conversation

hauntsaninja
Copy link
Contributor

@hauntsaninja hauntsaninja commented May 18, 2020

@hauntsaninja
Copy link
Contributor Author

hauntsaninja commented May 18, 2020

Alternative, terser phrasing from sys.rst:

Non-interactive stderr is now line-buffered instead of fully buffered.

I gave credit based on https://github.com/python/cpython/pull/17646/files#diff-c32d9a73be8db9e122317d9c23b6c0da — apologies if anyone else should be credited.

@hauntsaninja
Copy link
Contributor Author

cc @gvanrossum

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

There's one subtle point. This really only applies to the initial value of sys.stderr. If you assign something else to sys.stderr its buffering isn't magically going to change. But I'm not sure that most readers of this document would appreciate the extra words we'd need to add to make this distinction (since few people ever assign anything to sys.stderr), and to more advanced readers this would be obvious.

@gvanrossum
Copy link
Member

Thinking about it some more, the place to note that subtle point would've been the Misc/NEWS entry for the original PR, and since that didn't, let's say we won't need it here. So I'll mark this as automerge and go to bed.

@miss-islington miss-islington merged commit d17f3d8 into python:master May 18, 2020
@hauntsaninja hauntsaninja deleted the whatsnew branch May 18, 2020 05:21
@hauntsaninja
Copy link
Contributor Author

The "defaults to" phrasing helps hedge that (and -u), too, since if you assign to sys.stderr you aren't using the default.

arturoescaip pushed a commit to arturoescaip/cpython that referenced this pull request May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants