Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't show stdlib paths for user_level_warnings #8625

Merged
merged 2 commits into from
Jan 21, 2024

Conversation

max-sixty
Copy link
Collaborator

Was previously seeing:

  <frozen _collections_abc>:801: FutureWarning: The return type of `Dataset.dims` will be changed to return a set of dimension names in future, in order to be more consistent with `DataArray.dims`. To access a mapping from dimension names to lengths, please use `Dataset.sizes`.

Now:

  /Users/maximilian/workspace/xarray/xarray/tests/test_dataset.py:701: FutureWarning: The return type of `Dataset.dims` will be changed to return a set of dimension names in future, in order to be more consistent with `DataArray.dims`. To access a mapping from dimension names to lengths, please use `Dataset.sizes`.
    assert ds.dims == ds.sizes

It's a heuristic, so not perfect, but I think very likely to be accurate. Any contrary cases very welcome...

max-sixty and others added 2 commits January 18, 2024 16:45
Was previously seeing:

```
  <frozen _collections_abc>:801: FutureWarning: The return type of `Dataset.dims` will be changed to return a set of dimension names in future, in order to be more consistent with `DataArray.dims`. To access a mapping from dimension names to lengths, please use `Dataset.sizes`.
```

Now:

```
  /Users/maximilian/workspace/xarray/xarray/tests/test_dataset.py:701: FutureWarning: The return type of `Dataset.dims` will be changed to return a set of dimension names in future, in order to be more consistent with `DataArray.dims`. To access a mapping from dimension names to lengths, please use `Dataset.sizes`.
    assert ds.dims == ds.sizes
```

It's a heuristic, so not perfect, but I think very likely to be accurate. Any contrary cases very welcome...
@max-sixty max-sixty enabled auto-merge (squash) January 21, 2024 01:36
@max-sixty max-sixty merged commit e4bdc39 into pydata:main Jan 21, 2024
13 of 29 checks passed
@max-sixty max-sixty deleted the stack-level-fix branch January 21, 2024 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant