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
19
19
20
20
- Handle stdout/stderr being null https://github.com/Textualize/rich/pull/2513
21
21
- 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
22
23
23
24
## [ 12.5.2] - 2022-07-18
24
25
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ The following people have contributed to the development of Rich:
28
28
- [ Paul McGuire] ( https://github.com/ptmcg )
29
29
- [ Antony Milne] ( https://github.com/AntonyMilneQB )
30
30
- [ Michael Milton] ( https://github.com/multimeric )
31
+ - [ Martina Oefelein] ( https://github.com/oefe )
31
32
- [ Nathan Page] ( https://github.com/nathanrpage97 )
32
33
- [ Avi Perl] ( https://github.com/avi-perl )
33
34
- [ Laurent Peuch] ( https://github.com/psycojoker )
Original file line number Diff line number Diff line change @@ -216,6 +216,10 @@ def fileno(self) -> int:
216
216
def isatty (self ) -> bool :
217
217
return self .handle .isatty ()
218
218
219
+ @property
220
+ def mode (self ) -> str :
221
+ return self .handle .mode
222
+
219
223
@property
220
224
def name (self ) -> str :
221
225
return self .handle .name
Original file line number Diff line number Diff line change @@ -614,6 +614,7 @@ def test_wrap_file() -> None:
614
614
with open (filename , "rb" ) as file :
615
615
with rich .progress .wrap_file (file , total = total ) as f :
616
616
assert f .read () == b"Hello, World!"
617
+ assert f .mode == "rb"
617
618
assert f .name == filename
618
619
assert f .closed
619
620
assert not f .handle .closed
You can’t perform that action at this time.
0 commit comments