counsyl / stor

A cross-compatible CLI and Python API for accessing block and object storage
https://counsyl.github.io/stor/
Other
35 stars 12 forks source link

OBSFile does not implement seekable, readable and writeable #119

Open tophers42 opened 5 years ago

tophers42 commented 5 years ago

I believe OBSFile is intended to implement the io.IOBase interface (https://docs.python.org/3/library/io.html#io.IOBase), but it does not implement seekable, readable, and writeable. Additionally, it does not subclass the io.IOBase interface, although it seems like it should.

kyleabeauchamp commented 5 years ago

On a related note, I noticed recently that S3FS implements some of these base member functions through this library: https://github.com/intake/filesystem_spec (https://github.com/dask/s3fs/blob/master/requirements.txt#L3)

jtratner commented 5 years ago

Kyle - that library looks super cool! Maybe we can present an “fs spec” compatible interface that uses the current stor API under the hood.

Christoph - now that I’ve read implementation, since we just present a buffer under the hood - I think seekable and readable should always return True in read mode. What does local file pointer do in write mode? It should return same thing as there. Want to put up PR?

On Wed, Jul 24, 2019 at 14:31 Kyle Beauchamp notifications@github.com wrote:

On a related note, I noticed recently that S3FS implements some of these base member functions through this library: https://github.com/intake/filesystem_spec ( https://github.com/dask/s3fs/blob/master/requirements.txt#L3)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/counsyl/stor/issues/119?email_source=notifications&email_token=AAMGHK3BKVNZUCAUJIVNCTTQBDC33A5CNFSM4IGUUCV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2XVRRI#issuecomment-514808005, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMGHK4PCZW5W44AYXVGC4DQBDC33ANCNFSM4IGUUCVQ .