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
https://github.com/pydata/xarray/pull/5191#issuecomment-822861343,https://api.github.com/repos/pydata/xarray/issues/5191,822861343,MDEyOklzc3VlQ29tbWVudDgyMjg2MTM0Mw==,24736507,2021-04-19T23:46:45Z,2021-04-19T23:46:45Z,NONE,"Hello @max-sixty! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:

* In the file [`xarray/tests/__init__.py`](https://github.com/pydata/xarray/blob/99c113a966df07b7195d2d58a2558e98637a8acd/xarray/tests/__init__.py):

> [Line 3:1](https://github.com/pydata/xarray/blob/99c113a966df07b7195d2d58a2558e98637a8acd/xarray/tests/__init__.py#L3): [F401](https://duckduckgo.com/?q=pep8%20F401) 're' imported but unused





















","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,862107086