diff options
author | Gustavo Niemeyer <gustavo@niemeyer.net> | 2002-12-16 18:12:53 (GMT) |
---|---|---|
committer | Gustavo Niemeyer <gustavo@niemeyer.net> | 2002-12-16 18:12:53 (GMT) |
commit | 786ddb29c9170a585ca1010bd392fb5a5ff4078c (patch) | |
tree | f13b95625431e6be163ae9f0a03118b3f9d13a0d /Misc | |
parent | 17c5a33582be263e3d3484f1c16f17dadeea5b6f (diff) | |
download | cpython-786ddb29c9170a585ca1010bd392fb5a5ff4078c.zip cpython-786ddb29c9170a585ca1010bd392fb5a5ff4078c.tar.gz cpython-786ddb29c9170a585ca1010bd392fb5a5ff4078c.tar.bz2 |
Fixed bug
[#521782] unreliable file.read() error handling
* Objects/fileobject.c
(file_read): Clear errors before leaving the loop in all situations,
and also check if some data was read before exiting the loop with an
EWOULDBLOCK exception.
* Doc/lib/libstdtypes.tex
* Objects/fileobject.c
Document that sometimes a read() operation can return less data than
what the user asked, if running in non-blocking mode.
* Misc/NEWS
Document the fix.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -335,6 +335,9 @@ Core and builtins general left to right evaluation order rule. Now {f1(): f2()} will evaluate f1 first. +- Fixed bug #521782: when a file was in non-blocking mode, file.read() + could silently lose data or wrongly throw an unknown error. + Extension modules ----------------- |