[New-bugs-announce] [issue41449] An article on Python 3 stdout and stderr output buffering

Anatoli Babenia report at bugs.python.org
Fri Jul 31 06:10:32 EDT 2020


New submission from Anatoli Babenia <anatoli at rainforce.org>:

It is hard to find info why Python 3 buffers stdout/stderr. The buffering causes problems when debugging Python apps in Docker and Kubernetes, and it is unclear if it is Python 3 who starts to buffer stdout if no tty is attached, it is Docker, or it is Kubernetes.

The only bit of info that could be searched is the description of -u option https://docs.python.org/3.8/using/cmdline.html?#cmdoption-u which is not linked to any article.

The `-u` description also says.

> Changed in version 3.7: The text layer of the stdout and stderr streams now is unbuffered.

However, I don't understand what is the text layers of stdout. And there is no description of behaviour when the output is not attached, and when the output is redirected.

----------
assignee: docs at python
components: Documentation
messages: 374633
nosy: Anatoli Babenia, docs at python
priority: normal
severity: normal
status: open
title: An article on Python 3 stdout and stderr output buffering

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41449>
_______________________________________


More information about the New-bugs-announce mailing list