Skip to content

fix: Prevent early EOF error in reader.read#593

Merged
kylebarron merged 2 commits into
developmentseed:mainfrom
nvictus:fix-read-eof
Nov 7, 2025
Merged

fix: Prevent early EOF error in reader.read#593
kylebarron merged 2 commits into
developmentseed:mainfrom
nvictus:fix-read-eof

Conversation

@nvictus
Copy link
Copy Markdown
Contributor

@nvictus nvictus commented Nov 7, 2025

Fixes #592

Now reader.read(size) will return a truncated byte string instead of raising an OSError when size would extend past the end of the file, mirroring the behavior of the standard library IO types.

@nvictus nvictus mentioned this pull request Nov 7, 2025
@nvictus nvictus changed the title Fix early EOF error in reader.read fix: Prevent early EOF error in reader.read Nov 7, 2025
@github-actions github-actions Bot added the fix label Nov 7, 2025
Comment thread tests/test_buffered.py
@kylebarron
Copy link
Copy Markdown
Member

Thanks!

@kylebarron kylebarron merged commit 77a2b3a into developmentseed:main Nov 7, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reader raises after EOF

2 participants