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

bpo-13601: always use line-buffering for sys.stderr #17646

Open
wants to merge 2 commits into
base: master
from

Conversation

@jendrikseipp
Copy link

jendrikseipp commented Dec 17, 2019

@pitrou

This comment has been minimized.

Copy link
Member

pitrou commented Dec 17, 2019

@pitrou
pitrou approved these changes Dec 17, 2019
Copy link
Member

pitrou left a comment

LGTM, but it would be nice if you could add a test, for example in Lib/test/test_cmd_line.py.

the :option:`-u` command-line option.

.. versionchanged:: 3.9
Use line-buffering for non-interactive ``stderr``.

This comment has been minimized.

Copy link
@vstinner

vstinner Dec 18, 2019

Member

Would you mind to elaborate what was the behavior previously?

What is the kind of buffering when line-buffering is not used? "Fully buffered" or "unbuffered"?

* When interactive, the ``stdout`` stream is line-buffered. Otherwise,
it is block-buffered like regular text files. The ``stderr`` stream
is line-buffered in both cases. You can override this behaviour with
the :option:`-u` command-line option.

This comment has been minimized.

Copy link
@vstinner

vstinner Dec 18, 2019

Member

maybe explain that stdout and stderr are made fully unbuffered using -u.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.