-
Notifications
You must be signed in to change notification settings - Fork 26
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
Set store to read only after unpickling #405
Conversation
@@ -33,6 +34,7 @@ | |||
|
|||
class IcechunkStore(Store, SyncMixin): | |||
_store: PyIcechunkStore | |||
_pickle_preserves_read_only: bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put this on this class, not PyIcechunkStore, since this is the one that handles pickling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to get a review from @mpiannucci too
self._pickle_preserves_read_only = True | ||
yield | ||
finally: | ||
self._pickle_preserves_read_only = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be the previous value of the variable instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's always only modified in this method, so the previous value is always False.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
Closes #383
xref #185