Skip to content

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

Merged
miss-islington merged 1 commit intopython:masterfrom
hauntsaninja:whatsnew
May 18, 2020
Merged

bpo-13601: Mention stderr's line buffering in What's New#20168
miss-islington merged 1 commit intopython:masterfrom
hauntsaninja:whatsnew

Conversation

@hauntsaninja
Copy link
Copy Markdown
Contributor

@hauntsaninja hauntsaninja commented May 18, 2020

@hauntsaninja
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

cc @gvanrossum

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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