id,node_id,number,state,locked,title,user,body,created_at,updated_at,closed_at,merged_at,merge_commit_sha,assignee,milestone,draft,head,base,author_association,auto_merge,repo,url,merged_by 387064813,MDExOlB1bGxSZXF1ZXN0Mzg3MDY0ODEz,3858,closed,0,Backend env,2444231,"This merge request allows the user to set a `backend_env` while opening a file. This should be a dictionary, and the key/value pairs are temporarily added to `os.enviorn` while opening the file. The old environment is restored later. - [x] Closes #3853 Maybe -- I'm not sure if it is clever to actually close this issue at this point. I added the `backend_env` idea. - [ ] Tests added Here, I need some help: How should I actually design the tests? The environment is only temporarily modified, so as soon as the open_dataset function ends again, the environment is restored. I would have though temporarily adding an equivalent to `$ export lala=tada` into the environment and checking for that would be an idea; but since I restore the environment right away, there is no way I can see to actually access the new `os.environ` - [x] Passes `isort -rc . && black . && mypy . && flake8` - [x] Fully documented, including `whats-new.rst` for all changes and `api.rst` for new API I added a section to the relevant docstring. Not sure how much this needs to also be included in the other files. ",2020-03-12T06:30:28Z,2023-01-05T03:58:54Z,2023-01-05T03:58:54Z,,781a0807fe1487bdaf72a0b89468ab5d2fe7701e,,,0,32728fbcc17892047f3834f7894b3d9d6b550086,d1e4164f3961d7bbb3eb79037e96cae14f7182f8,NONE,,13221727,https://github.com/pydata/xarray/pull/3858,