Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Fixed

- Fixed incompatibility issue with latest boto3/botocore release (>=1.37.34) .

## [v1.7.1](https://github.com/allenai/cached_path/releases/tag/v1.7.1) - 2025-03-11

### Fixed
Expand Down
18 changes: 12 additions & 6 deletions cached_path/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,24 @@ def __init__(self, handle: io.BufferedWriter, progress: Progress, task_id: TaskI
self.progress = progress
self.task_id = task_id
self.total_written = 0
self.handle.mode

@property
def mode(self):
return self.handle.mode

@property
def closed(self) -> bool:
return self.handle.closed

def __enter__(self) -> "BufferedWriterWithProgress":
self.handle.__enter__()
return self

def __exit__(self, exc_type, exc_val, exc_tb):
del exc_type, exc_val, exc_tb
self.close()

@property
def closed(self) -> bool:
return self.handle.closed

def close(self):
self.handle.close()

Expand All @@ -78,8 +84,8 @@ def writable(self) -> bool:
def read(self, size: Optional[int] = -1) -> bytes:
return self.handle.read(size)

def read1(self, size: Optional[int] = -1) -> bytes:
return self.handle.read1()
def read1(self, size: int = -1, /) -> bytes:
return self.handle.read1(size)

def readinto(self, b):
return self.handle.readinto(b)
Expand Down