File tree Expand file tree Collapse file tree 4 files changed +7
-0
lines changed Expand file tree Collapse file tree 4 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919
2020-  Handle stdout/stderr being null https://github.com/Textualize/rich/pull/2513 
2121-  Fix NO_COLOR support on legacy Windows https://github.com/Textualize/rich/pull/2458 
22+ -  Fix missing ` mode `  property on file wrapper breaking uploads via ` requests `  https://github.com/Textualize/rich/pull/2495 
2223
2324## [ 12.5.2]  - 2022-07-18 
2425
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ The following people have contributed to the development of Rich:
2828-  [ Paul McGuire] ( https://github.com/ptmcg ) 
2929-  [ Antony Milne] ( https://github.com/AntonyMilneQB ) 
3030-  [ Michael Milton] ( https://github.com/multimeric ) 
31+ -  [ Martina Oefelein] ( https://github.com/oefe ) 
3132-  [ Nathan Page] ( https://github.com/nathanrpage97 ) 
3233-  [ Avi Perl] ( https://github.com/avi-perl ) 
3334-  [ Laurent Peuch] ( https://github.com/psycojoker ) 
Original file line number Diff line number Diff line change @@ -216,6 +216,10 @@ def fileno(self) -> int:
216216    def  isatty (self ) ->  bool :
217217        return  self .handle .isatty ()
218218
219+     @property  
220+     def  mode (self ) ->  str :
221+         return  self .handle .mode 
222+ 
219223    @property  
220224    def  name (self ) ->  str :
221225        return  self .handle .name 
Original file line number Diff line number Diff line change @@ -614,6 +614,7 @@ def test_wrap_file() -> None:
614614        with  open (filename , "rb" ) as  file :
615615            with  rich .progress .wrap_file (file , total = total ) as  f :
616616                assert  f .read () ==  b"Hello, World!" 
617+                 assert  f .mode  ==  "rb" 
617618                assert  f .name  ==  filename 
618619            assert  f .closed 
619620            assert  not  f .handle .closed 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments