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/7238#issuecomment-1303356166,https://api.github.com/repos/pydata/xarray/issues/7238,1303356166,IC_kwDOAMm_X85Nr6MG,6628425,2022-11-04T12:07:19Z,2022-11-04T12:07:19Z,MEMBER,It looks like I've stumbled upon some new upstream test failures related to https://github.com/pandas-dev/pandas/pull/49101.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1428748922
https://github.com/pydata/xarray/pull/7238#issuecomment-1303303334,https://api.github.com/repos/pydata/xarray/issues/7238,1303303334,IC_kwDOAMm_X85NrtSm,6628425,2022-11-04T11:39:44Z,2022-11-04T11:39:44Z,MEMBER,"Nice find @mathause! That seems to work. I added a version of that function to `utils`. The warning from [my example above](https://github.com/pydata/xarray/pull/7238#issuecomment-1296235033) now looks like:
```
test_warning.py:5: UserWarning: Converting non-nanosecond precision datetime values to nanosecond precision. This behavior can eventually be relaxed in xarray, as it is an artifact from pandas which is now beginning to support non-nanosecond precision values. This warning is caused by passing non-nanosecond np.datetime64 or np.timedelta64 values to the DataArray or Variable constructor; it can be silenced by converting the values to nanosecond precision ahead of time.
da = xr.DataArray([1], dims=[""time""], coords=[times])
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1428748922
https://github.com/pydata/xarray/pull/7238#issuecomment-1296235033,https://api.github.com/repos/pydata/xarray/issues/7238,1296235033,IC_kwDOAMm_X85NQvoZ,6628425,2022-10-30T11:56:00Z,2022-10-30T11:56:00Z,MEMBER,"Hmm...I was kind of hoping we could avoid something like adding a `_stacklevel_increment` argument, but hardcoding the `stacklevel` obviously doesn't work in the case that fields are converted to variables within xarray, e.g. in the case of passing coordinates to the DataArray constructor:
```python
import numpy as np
import xarray as xr
times = [np.datetime64(""2000-01-01"", ""us"")]
da = xr.DataArray([1], dims=[""time""], coords=[times])
```
```
$ python test_warning.py
/Users/spencer/software/xarray/xarray/core/dataarray.py:148: UserWarning: Converting non-nanosecond precision datetime values to nanosecond precision. This behavior can eventually be relaxed in xarray, as it is an artifact from pandas which is now beginning to support non-nanosecond precision values. This warning is caused by passing non-nanosecond np.datetime64 or np.timedelta64 values to the DataArray or Variable constructor; it can be silenced by converting the values to nanosecond precision ahead of time.
var = as_variable(coord, name=dim)
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1428748922