html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/pull/7880#issuecomment-1572437423,https://api.github.com/repos/pydata/xarray/issues/7880,1572437423,IC_kwDOAMm_X85duX2v,14808389,2023-06-01T17:01:56Z,2023-06-01T17:06:06Z,MEMBER,"that appears to work on both my laptop and my local HPC, and is arguably a lot easier to implement / understand as we don't need to make sure all the globals we use are still available (which in this case would be `acquire`, `OPTIONS`, `warnings`, and `RuntimeWarning`).
Edit: let me change the PR to do that instead","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1730664352
https://github.com/pydata/xarray/pull/7880#issuecomment-1572384036,https://api.github.com/repos/pydata/xarray/issues/7880,1572384036,IC_kwDOAMm_X85duK0k,14808389,2023-06-01T16:38:23Z,2023-06-01T16:54:08Z,MEMBER,"> Have you verfied that this fixes things at least on your machine?
I thought I did, but apparently something changed: right now it fails because `OPTIONS` is not available anymore, so we might have to add a reference to that, as well. Additionally, for the warning we use `warnings.warn` and `RuntimeWarning` that might also have disappeared already (but those are standard library / builtins, so hopefully not?)
In any case, you can verify this, too:
- create a new environment using `mamba create -n test python=3.11 numpy pandas packaging pooch netcdf4` and activate it
- run `pip install 'dask[array]'` to install `dask` without `distributed` (this appears to make a difference for me, not sure if that's the same elsewhere)
- editable-install `xarray` so we can easily switch between branches
- run `python -c 'import xarray as xr; ds = xr.tutorial.open_dataset(""air_temperature"", chunks={})'`
This should print an error for `main` and shouldn't with this branch (confirmed on my local HPC).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1730664352
https://github.com/pydata/xarray/pull/7880#issuecomment-1572363440,https://api.github.com/repos/pydata/xarray/issues/7880,1572363440,IC_kwDOAMm_X85duFyw,14808389,2023-06-01T16:26:42Z,2023-06-01T16:26:42Z,MEMBER,"the issue is that this doesn't occur on normal garbage collection but only on interpreter shutdown. So really, I don't think we have any way to test this using `pytest` as that itself is written in python (unless of course we can make use of sub-interpreters, but that might be more trouble than it's worth).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1730664352
https://github.com/pydata/xarray/pull/7880#issuecomment-1567446747,https://api.github.com/repos/pydata/xarray/issues/7880,1567446747,IC_kwDOAMm_X85dbVbb,14808389,2023-05-29T19:22:12Z,2023-05-29T19:22:12Z,MEMBER,"> I would have thought that the global (or module level here) variable/function aquire should have at least one reference until after the deletion of the object.
I think this is intended (though certainly not very easy to get right): see the second part of the [warning in the `__del__` documentation](https://docs.python.org/3/reference/datamodel.html#object.__del__).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1730664352