-
-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
re-opening ZipStore
with a new mode
#2448
Comments
IIRC, ZipStore has some instance level state that makes it hard to re-open. The file needs to be closed and the ZIP footer written before anyone else can open the file (going off memory, so I might have some details wrong). |
that means that zarr-python/src/zarr/storage/common.py Lines 224 to 227 in 4c3081c
If we want to keep these store semantics (I'm not sure that we do...) we should add a zipstore-specific exception here that instructs users how to open their zipstored data with a different mode. Otherwise, invoking something like |
would it be terrible if |
I wonder how you'd do that... Looking more closely, I see my earlier comment about ZipStore sharing some state wasn't 100% right. Really all we share is a
Is it possible to have both, by having our write / read calls automatically call open if needed? If so, then maybe I'm not sure what the downsides of this kind of just-in-time reopening would be. |
upon calling zarr-python/src/zarr/storage/zip.py Lines 86 to 93 in 4c3081c
|
In
main
it's not possible to make a read-only copy of aZipStore
instance. Is there any particular reason why this is not allowed, or is it something we could add? Naively, it seems like a read-only copy of any store class should always be safe to generate.The text was updated successfully, but these errors were encountered: