[issue7932] print statement delayed IOError when stdout has been closed

2021-11-26 Thread Irit Katriel
Irit Katriel added the comment: Reproduced on 3.11: cpython % ./python.exe -c 'import sys; print("x", file=sys.stdout)' 1>&- ; echo $? 0 cpython % ./python.exe -c 'import sys; print("x", file=sys.stderr)' 2>&- ; echo $? x 0 -- nosy: +iritkatriel versions: +Python 3.11 -Python 3.5

[issue7932] print statement delayed IOError when stdout has been closed

2019-03-15 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue7932] print statement delayed IOError when stdout has been closed

2014-06-22 Thread Martin v . Löwis
Changes by Martin v. Löwis : -- nosy: -loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue7932] print statement delayed IOError when stdout has been closed

2014-06-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: I have no interest to work on this. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue7932] print statement delayed IOError when stdout has been closed

2014-06-22 Thread Eugene Tang
Eugene Tang added the comment: A similar problem seems to appear in Python 3.5 ./python -c 'import sys; print("x", file=sys.stdout)' 1>&- ; echo $? 0 ./python -c 'import sys; print("x", file=sys.stderr)' 2>&- ; echo $? x 0 but again, this does seem to be a very specific corner case.

[issue7932] print statement delayed IOError when stdout has been closed

2014-06-08 Thread tholzer
tholzer added the comment: It's still a problem in Python 2.7: python -c 'import sys; print >> sys.stdout, "x"' 1>&- ; echo $? close failed in file object destructor: sys.excepthook is missing lost sys.stderr 0 But feel free to close as "won't fix", as this seems to be an edge case which might

[issue7932] print statement delayed IOError when stdout has been closed

2014-06-06 Thread Mark Lawrence
Mark Lawrence added the comment: Is there any interest in following this up as 2.6 is out of support? -- nosy: +BreamoreBoy ___ Python tracker ___

[issue7932] print statement delayed IOError when stdout has been closed

2010-02-15 Thread tholzer
tholzer added the comment: This is not quite correct: The following 2 lines fail as expected (unbuffered): python -u -c 'import sys; print >> sys.stdout, "x"' 1>&- ; echo $? python -u -c 'import sys; print >> sys.stderr, "x"' 2>&- ; echo $? whereas in the following example, the first comman

[issue7932] print statement delayed IOError when stdout has been closed

2010-02-14 Thread Martin v . Löwis
Martin v. Löwis added the comment: This is not a bug. The output stream gets buffered, and that it is closed is only detected when a flush is attempted. Use the -u option if you want unbuffered stdout. It is, however, a bug that Python 2.6 apparently fails to flush the output at all; Python

[issue7932] print statement delayed IOError when stdout has been closed

2010-02-14 Thread tholzer
New submission from tholzer : When printing to a closed stdout file descriptor, the print statement only raises an IOError at character 8192. The expected behaviour is that IOError gets raised immediately (i.e. on the first character). Compare this behaviour to writing to a closed sys.stderr.