[Python-checkins] python/dist/src/Doc/lib libstdtypes.tex,1.113,1.114

niemeyer@users.sourceforge.net niemeyer@users.sourceforge.net
Mon, 16 Dec 2002 10:13:20 -0800


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv643/Doc/lib

Modified Files:
	libstdtypes.tex 
Log Message:
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.


Index: libstdtypes.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v
retrieving revision 1.113
retrieving revision 1.114
diff -C2 -d -r1.113 -r1.114
*** libstdtypes.tex	11 Dec 2002 07:14:03 -0000	1.113
--- libstdtypes.tex	16 Dec 2002 18:12:45 -0000	1.114
***************
*** 1206,1210 ****
    an \EOF{} is hit.)  Note that this method may call the underlying
    C function \cfunction{fread()} more than once in an effort to
!   acquire as close to \var{size} bytes as possible.
  \end{methoddesc}
  
--- 1206,1212 ----
    an \EOF{} is hit.)  Note that this method may call the underlying
    C function \cfunction{fread()} more than once in an effort to
!   acquire as close to \var{size} bytes as possible. Also note that
!   when in non-blocking mode, less data than what was requested may
!   be returned, even if no \var{size} parameter was given.
  \end{methoddesc}