Skip to content
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

Fix ASDF error in ZCV module, add ASDF 3.1.0 support #130

Merged
merged 4 commits into from
Mar 1, 2024

Conversation

lgarrison
Copy link
Member

Fixes OSError: Attempt to read block data from missing block in the ZCV module, maybe caused by trying to load an array after the corresponding AsdfFile had been garbage collected(?).

Also adds support for ASDF 3.1.0, which renamed asdf.compression to asdf._compression.

I want to think a bit more generally about how we're loading arrays from ASDF files before we merge this. I think we're not doing it safely in many cases (e.g. not using context managers), but I'm also not exactly sure what ASDF guarantees about object lifetimes. There's also the related question of how to ensure that arrays in the tree that we reference are actually getting loaded before the file handle closes. I've opened asdf-format/asdf#1764 to ask about this.

@lgarrison lgarrison marked this pull request as draft February 29, 2024 23:58
@lgarrison
Copy link
Member Author

Actually, I think I want to go ahead and merge this and make a bugfix release since installations that use the latest ASDF version are going to start failing otherwise.

CC @boryanah

@lgarrison lgarrison marked this pull request as ready for review March 1, 2024 13:54
@lgarrison lgarrison changed the title Fix ASDF error in ZCV module Fix ASDF error in ZCV module, add ASDF 3.1.0 support Mar 1, 2024
@lgarrison lgarrison merged commit 7b0f985 into main Mar 1, 2024
9 checks passed
@lgarrison lgarrison deleted the zcv-advect-asdf-fix branch March 1, 2024 14:15
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.

1 participant