Calling read with nonzero size on Python file-likes return an empty byte string once EOF is reached.
It seems obstore readers are inconsistent with this behavior and raise an exception instead.
f = open(..., "rb")
f.read()
f.read(1) # -> b""
f = fsspec.open(..., mode="rb").open()
f.read()
f.read(1) # -> b""
store = obstore.store.from_url(..., skip_signature=True)
f = obstore.open_reader(store, "")
f.read()
f.read(1) # OSError: early eof
Calling
readwith nonzero size on Python file-likes return an empty byte string once EOF is reached.It seems obstore readers are inconsistent with this behavior and raise an exception instead.