pull_requests: 835589346
This data as json
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
835589346 | PR_kwDOAMm_X84xzhTi | 6212 | closed | 0 | better warning filter for assert_* | 10194086 | In #4864 I added a a decorator for the `xarray.testing.assert_*` functions to ensure warnings that were to errors (`pytest.mark.filterwarnings("error")`) do not error in `assert_*` (see https://github.com/pydata/xarray/pull/4760#issuecomment-774101639). As a solution I added https://github.com/pydata/xarray/blob/5470d933452d88deb17cc9294a164c4a03f55dec/xarray/testing.py#L32 However, this is sub-optimal because this now removes all `ignore` filters! As dask stuff only gets evaluated in `assert_*` filters like `warnings.filterwarnings("ignore", "Mean of empty slice")` don't work for dask arrays! I thought of setting ```python warnings.simplefilter("ignore") ``` but this could suppress warnings we want to keep. So now I remove all `"error"` warning filters and keep the rest. Note that the original filters get restored after `with warnings.catch_warnings():`. (). --- I am not sure I expressed myself very clearly... let me know and I can try again. @keewis you had a look at #4864 maybe you can review this PR as well? | 2022-01-31T00:22:37Z | 2022-09-05T07:52:09Z | 2022-09-05T07:52:06Z | 2022-09-05T07:52:06Z | a6a6ac09c6d4b3f80aeccb1638ad26ceadda1d29 | 0 | 06fc8c9b8dcf2b0b950c30bad514f2b6420c3da7 | 3c4a00cc123ceb6fba442cf721650ffa6b473cbb | MEMBER | 13221727 | https://github.com/pydata/xarray/pull/6212 |
Links from other tables
- 1 row from pull_requests_id in labels_pull_requests