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/issues/3268#issuecomment-525377722,https://api.github.com/repos/pydata/xarray/issues/3268,525377722,MDEyOklzc3VlQ29tbWVudDUyNTM3NzcyMg==,1217238,2019-08-27T16:22:44Z,2019-08-27T16:22:44Z,MEMBER,"It isn't just methods that use `_to_temp_dataset()` that result in losing the accessor state -- any operation that creates a new `DataArray` will (by design) lose the accessor, which don't get propagated in any operations.

Accessors are also not preserved when indexing a DataArray out of a Dataset (https://github.com/pydata/xarray/issues/3205), cc @djhoese.

I had not contemplated the issue of circular references, which I agree is not ideal. If we had realized that when creating accessors in the first place we might have chosen a different design, but there are a number of users who rely upon it.

> The circular reference issue could also be worked around in a user-friendly way by having the decorator automatically add methods to the decorated class

I like the look of this solution. It will still require users to update their code to avoid circular references (e.g., by removing their own `__init__` method), but it will make the default behavior more sane.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,485708282