File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -66,8 +66,8 @@ In-memory text streams are also available as :class:`StringIO` objects::
6666
6767.. note ::
6868
69-    When working with a non-blocking stream, be aware that operations on text I/O objects
70-    might raise a :exc: `BlockingIOError ` if the stream cannot perform a read  operation
69+    When working with a non-blocking stream, be aware that read  operations on text I/O objects
70+    might raise a :exc: `BlockingIOError ` if the stream cannot perform the  operation
7171   immediately.
7272
7373
Original file line number Diff line number Diff line change @@ -2525,8 +2525,7 @@ def read(self, size=None):
25252525        if  size  <  0 :
25262526            chunk  =  self .buffer .read ()
25272527            if  chunk  is  None :
2528-                 raise  BlockingIOError ("Unexpected None encountered. This may be due to non-blocking I/O or an issue " 
2529-                                       "with the underlying I/O implementation." )
2528+                 raise  BlockingIOError ("Read returned None." )
25302529            # Read everything. 
25312530            result  =  (self ._get_decoded_chars () + 
25322531                      decoder .decode (chunk , final = True ))
Original file line number Diff line number Diff line change @@ -1993,8 +1993,7 @@ _io_TextIOWrapper_read_impl(textio *self, Py_ssize_t n)
19931993            goto fail ;
19941994
19951995        if  (bytes  ==  Py_None ){
1996-             PyErr_SetString (PyExc_BlockingIOError , "Unexpected None encountered. This may be due to non-blocking I/O " 
1997-                                                    "or an issue with the underlying I/O implementation." );
1996+             PyErr_SetString (PyExc_BlockingIOError , "Read returned None." );
19981997            return  NULL ;
19991998
20001999        }
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments