Skip to content

Fix overwrite modes #3062

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

dstansby
Copy link
Contributor

@dstansby dstansby commented May 15, 2025

Fixes #3061. @jhamman, you last modified these lines in #2442, is there a reason why "a" and "r+" was in ovewrite modes? It seems to me like they definitely shouldn't be there.

@github-actions github-actions bot added the needs release notes Automatically applied to PRs which haven't added release notes label May 15, 2025
@dstansby dstansby added this to the 3.0.8 milestone May 15, 2025
@jhamman
Copy link
Member

jhamman commented May 16, 2025

Thanks @dstansby for picking this up. In principle, I'm fine with the fix you have proposed but we may also consider just adding mode='r' to the open call here. That would be the more surgical fix. Or perhaps we should do both!

@dstansby
Copy link
Contributor Author

dstansby commented May 16, 2025

What would be the logic in leaving "a" and "r+" in overwrite modes, given those modes should not overwrite any data (as far as I can tell)?

@github-actions github-actions bot removed the needs release notes Automatically applied to PRs which haven't added release notes label May 16, 2025
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.

zarr.load deletes data
2 participants