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/2121#issuecomment-388922657,https://api.github.com/repos/pydata/xarray/issues/2121,388922657,MDEyOklzc3VlQ29tbWVudDM4ODkyMjY1Nw==,1217238,2018-05-14T18:47:55Z,2018-05-14T18:47:55Z,MEMBER,"The simplest design here would be to extract the logic from [DataStorePickleMixin](https://github.com/pydata/xarray/blob/33095885e6a4d7b2504ced5d9d4d34f1d6e872e2/xarray/backends/common.py#L368) into a pickleable wrapper class that could be used in `rasterio.open()`. e.g., instead of ``` riods = rasterio.open(filename, mode='r') ``` we would write ``` riods_wrapper = PickleByReconstructionWrapper(rasterio.open, filename, mode='r') ``` `PickleByReconstructionWrapper` would need to define `__setstate__`/`__getstate__` (for pickleability), and would also have a `.value` attribute for pulling out the unwrapped file object. Eventually, we should probably refactor xarray's existing data stores to use this -- the current logic is really messy/hard to understand. We'll probably also want to eventually factor out the auto-close logic in some composable way, but that can be saved for later.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,322445312 https://github.com/pydata/xarray/issues/2121#issuecomment-388786292,https://api.github.com/repos/pydata/xarray/issues/2121,388786292,MDEyOklzc3VlQ29tbWVudDM4ODc4NjI5Mg==,1872600,2018-05-14T11:34:45Z,2018-05-14T11:34:45Z,NONE,"@jhamman what kind of expertise would it take to do this job (e.g, it just a copy-and-paste with some small changes that a newbie could probably do, or would it be best for core dev team)? And is there any workaround that can be used in the interim?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,322445312