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/5630#issuecomment-885801454,https://api.github.com/repos/pydata/xarray/issues/5630,885801454,IC_kwDOAMm_X840zEHu,1217238,2021-07-23T17:50:16Z,2021-07-23T17:50:57Z,MEMBER,"I would still return something from `Dataset.update()` for now.
I agree that it would be great to remove it, but to do that perhaps we could make some of Dataset subclass that issues a warning when any method is called on it? Perhaps something like:
```python
import xarray
import warnings
class DeprecatedDatasetFromUpdate(xarray.Dataset):
__slots__ = ['_accessed']
def __init__(self, *args, **kwargs):
self._accessed = False
super().__init__(*args, **kwargs)
def __getattribute__(self, key):
if not super().__getattribute__('_accessed'):
warnings.warn(
""This xarray.Dataset was created as the return value of ""
""xarray.Dataset.update(), but update() will return None in the ""
""future"",
category=FutureWarning)
self._accessed = True
return super().__getattribute__(key)
```
But could be a little tricky to get right, so perhaps let's save this for a later PR.","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,951121126