Registry Mirror
Skip to content

Conversation

@nightcityblade

Copy link
Copy Markdown
Contributor

Description

Dataset.copy() currently drops the dataset's resource-closing callback even though the copied lazy variables can still access the same backend. If the original dataset is closed and the copy later reopens the file while loading, copied.close() cannot release that handle.

Preserve the callback on copies so either dataset can close a reopened backend resource. The regression test covers closing both the original dataset and its copy.

Checklist

AI Disclosure

@github-actions github-actions Bot added topic-backends topic-indexing topic-CF conventions topic-groupby topic-dask topic-plotting topic-testing topic-performance topic-cftime topic-zarr Related to zarr storage library topic-arrays related to flexible array support CI Continuous Integration tools topic-html-repr topic-rolling dependencies Pull requests that update a dependency file Automation Github bots, testing workflows, release automation topic-DataTree Related to the implementation of a DataTree class topic-typing topic-hypothesis Strategies or tests using the hypothesis library io topic-NamedArray Lightweight version of Variable labels Sep 30, 2026
@nightcityblade

Copy link
Copy Markdown
Contributor Author

Superseded by #11643 after correcting the branch history and the mypy annotation in the regression test. The replacement PR preserves the same focused three-file change and one-commit history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Automation Github bots, testing workflows, release automation CI Continuous Integration tools dependencies Pull requests that update a dependency file io topic-arrays related to flexible array support topic-backends topic-CF conventions topic-cftime topic-dask topic-DataTree Related to the implementation of a DataTree class topic-groupby topic-html-repr topic-hypothesis Strategies or tests using the hypothesis library topic-indexing topic-NamedArray Lightweight version of Variable topic-performance topic-plotting topic-rolling topic-testing topic-typing topic-zarr Related to zarr storage library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

load after close automatically reopens, but doesn't close everything

1 participant