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/5191#issuecomment-824223959,https://api.github.com/repos/pydata/xarray/issues/5191,824223959,MDEyOklzc3VlQ29tbWVudDgyNDIyMzk1OQ==,5635139,2021-04-21T17:14:00Z,2021-04-21T19:04:00Z,MEMBER,"I'll merge this so we put `raises_regex` to rest, and keep an eye on the scipy issue. If others have used `raises_regex`, we may get some failures on merging their branch. The easiest approach is to merge master into their branch such that `raises_regex` fails and requires replacing. But if we make a mistake and merge, it's easy to fix, I'll try and spot it early.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,862107086 https://github.com/pydata/xarray/pull/5191#issuecomment-823260631,https://api.github.com/repos/pydata/xarray/issues/5191,823260631,MDEyOklzc3VlQ29tbWVudDgyMzI2MDYzMQ==,14808389,2021-04-20T13:09:30Z,2021-04-20T13:35:29Z,MEMBER,"this seems to be something in `pytest.raises`: ```python with pytest.raises(error) as excinfo: ... ``` behaves different from ```python with pytest.raises(error): ... ``` so the test will pass for the former but not the latter. Actually, I can reproduce without involving `open_dataset` (or `xarray`) at all: replacing it with calls to `open_` will still close and show the exact same behavior. For reference, this will fail on the second `assert`: ```python import pytest import scipy.io def open_(f): return scipy.io.netcdf_file(f, mode=""r"", version=2) def test_open(): filename = ""file.nc"" with open(filename, mode=""w"") as f: f.write(""abcdefghijklmnopqrstuvwxyz"") with open(filename, mode=""rb"") as f: with pytest.raises(TypeError) as excinfo: open_(f) assert not f.closed, ""first file closed"" with open(filename, mode=""rb"") as f: with pytest.raises(TypeError): open_(f) assert not f.closed, ""second file closed"" ``` Edit: I tried asking the `scipy` devs, see scipy/scipy#13905","{""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,862107086