Skip to content

Conversation

@u8sand
Copy link
Contributor

@u8sand u8sand commented Jan 20, 2022

Writes after seeks on the fuse mounted filesystem fail, this fixes it and things like pd.HDFStore operability on these mounted filesystems.

@isidentical
Copy link
Member

If you can, it would be really nice if we can add a test for that so future regressions won't happen though can see that this is a clear bug.

@u8sand
Copy link
Contributor Author

u8sand commented Jan 20, 2022

@isidentical I wrote the test but discovered another bug.. the seek+read isn't working on the memory provider (added a commented out assertion) which is odd since BytesIO seems to do seeking just fine.

Update 1
Seeking works in both MemoryFileSystem and LocalFileSystem when in mode r+ but not when in mode w+ for either. While + in mode enables reading and writing at the same time, that would be a PR for another day.

Update 2
Nonetheless my simple patch fixes seek + writing which is necessary for certain kinds of writers (like h5 files). My tests were cleaned up accordingly to focus on this functionality and not read/write (+) mode.

Copy link
Member

@isidentical isidentical left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@martindurant martindurant merged commit 3cc5b48 into fsspec:master Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants