id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 1411125069,I_kwDOAMm_X85UHA9N,7177,xarray throws FutureWarning when using .interp method,12728107,closed,0,,,2,2022-10-17T08:21:42Z,2022-10-17T09:18:07Z,2022-10-17T09:18:07Z,NONE,,,,"### What happened? I get a FutureWarning when using the .interp method on an xarray.DataArray The issue is probably related to #6625, #5721 and #6195. ### Steps to reproduce 1. conda create -n test xarray scipy 2. conda activate test 3. python -c ""import xarray; xarray.DataArray([1., 2.]).interp(dim_0=0.5)"" ### Expected output Nothing ### Actual output C:\Miniconda3\envs\test\lib\site-packages\xarray\core\missing.py:562: FutureWarning: Passing method to Int64Index.get_loc is deprecated and will raise in a future version. Use index.get_indexer([item], method=...) instead. imin = index.get_loc(minval, method=""nearest"") C:\Miniconda3\envs\test\lib\site-packages\xarray\core\missing.py:563: FutureWarning: Passing method to Int64Index.get_loc is deprecated and will raise in a future version. Use index.get_indexer([item], method=...) instead. imax = index.get_loc(maxval, method=""nearest"") ### What did you expect to happen? I expected no warning ### Minimal Complete Verifiable Example ```Python import xarray xarray.DataArray([1., 2.]).interp(dim_0=0.5) ``` ### MVCE confirmation - [X] Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray. - [X] Complete example — the example is self-contained, including all data and the text of any traceback. - [X] Verifiable example — the example copy & pastes into an IPython prompt or [Binder notebook](https://mybinder.org/v2/gh/pydata/xarray/main?urlpath=lab/tree/doc/examples/blank_template.ipynb), returning the result. - [X] New issue — a search of GitHub Issues suggests this is not a duplicate. ### Relevant log output ```Python C:\Miniconda3\envs\test\lib\site-packages\xarray\core\missing.py:562: FutureWarning: Passing method to Int64Index.get_loc is deprecated and will raise in a future version. Use index.get_indexer([item], method=...) instead. imin = index.get_loc(minval, method=""nearest"") C:\Miniconda3\envs\test\lib\site-packages\xarray\core\missing.py:563: FutureWarning: Passing method to Int64Index.get_loc is deprecated and will raise in a future version. Use index.get_indexer([item], method=...) instead. imax = index.get_loc(maxval, method=""nearest"") ``` ### Anything else we need to know? _No response_ ### Environment
``` C:\Miniconda3\envs\test\lib\site-packages\_distutils_hack\__init__.py:33: UserWarning: Setuptools is replacing distutils. warnings.warn(""Setuptools is replacing distutils."") INSTALLED VERSIONS ------------------ commit: None python: 3.10.6 | packaged by conda-forge | (main, Oct 7 2022, 20:14:50) [MSC v.1916 64 bit (AMD64)] python-bits: 64 OS: Windows OS-release: 10 machine: AMD64 processor: Intel64 Family 6 Model 158 Stepping 9, GenuineIntel byteorder: little LC_ALL: None LANG: None LOCALE: ('Norwegian Bokmål_Norway', '1252') libhdf5: None libnetcdf: None xarray: 0.20.1 pandas: 1.4.4 numpy: 1.23.1 scipy: 1.9.1 netCDF4: None pydap: None h5netcdf: None h5py: None Nio: None zarr: None cftime: None nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: 1.3.5 dask: None distributed: None matplotlib: None cartopy: None seaborn: None numbagg: None fsspec: None cupy: None pint: None sparse: None setuptools: 63.4.1 pip: 22.2.2 conda: None pytest: None IPython: None sphinx: None ```
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7177/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 600268506,MDU6SXNzdWU2MDAyNjg1MDY=,3974,load_dataset fails when filename is unicode,12728107,closed,0,,,4,2020-04-15T12:42:49Z,2022-05-06T08:13:04Z,2022-05-06T08:13:04Z,NONE,,,,"It seems like xarray does not handle unicode file names. The error is present even if the unicode characters appear in the parent path. #### MCVE Code Sample ```python import xarray as xr import os xr.Dataset().to_netcdf('caesar.nc') os.rename('caesar.nc', 'cæsar.nc') try: xr.load_dataset('cæsar.nc') print('Success') except FileNotFoundError: print('File not found') ``` #### Expected Output 'Success' #### Actual Output 'File not found' #### Problem Description xarray does not recognize file names with unicode letters #### Versions
Output of `xr.show_versions()` INSTALLED VERSIONS ------------------ commit: None python: 3.7.7 (default, Mar 23 2020, 23:19:08) [MSC v.1916 64 bit (AMD64)] python-bits: 64 OS: Windows OS-release: 10 machine: AMD64 processor: Intel64 Family 6 Model 158 Stepping 9, GenuineIntel byteorder: little LC_ALL: None LANG: None LOCALE: None.None libhdf5: 1.10.4 libnetcdf: 4.6.1 xarray: 0.15.1 pandas: 1.0.3 numpy: 1.18.1 scipy: 1.4.1 netCDF4: 1.4.2 pydap: None h5netcdf: None h5py: 2.10.0 Nio: None zarr: None cftime: 1.1.1.1 nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: 2.14.0 distributed: 2.14.0 matplotlib: 3.1.0 cartopy: 0.17.0 seaborn: None numbagg: None setuptools: 46.1.3.post20200330 pip: 20.0.2 conda: 4.8.3 pytest: 5.4.1 IPython: 7.13.0 sphinx: None
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3974/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 935773022,MDU6SXNzdWU5MzU3NzMwMjI=,5566,xarray fails on Travis CI,12728107,closed,0,,,4,2021-07-02T13:28:41Z,2021-07-02T19:27:59Z,2021-07-02T19:21:06Z,NONE,,,,"Hi, I have a project build on xarray that now fails on travis. It only fails on python 3.7. Have no idea why. Minimal sample travis.yml that still fails: -------------------- language: python python: - ""3.7"" install: - python --version - pip --version - pip install --upgrade setuptools numpy - pip install xarray - pip list script: - python -c ""import xarray"" ----------------------------- Error message (stack trace): Traceback (most recent call last): File """", line 1, in File ""/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/xarray/__init__.py"", line 3, in from . import testing, tutorial, ufuncs File ""/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/xarray/testing.py"", line 8, in from xarray.core import duck_array_ops, formatting, utils File ""/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/xarray/core/duck_array_ops.py"", line 16, in from . import dask_array_compat, dask_array_ops, dtypes, npcompat, nputils File ""/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/xarray/core/npcompat.py"", line 81, in from numpy.typing import ArrayLike, DTypeLike File ""/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/numpy/typing/__init__.py"", line 315, in from ._shape import _Shape, _ShapeLike File ""/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/numpy/typing/_shape.py"", line 15, in _ShapeLike = Union[SupportsIndex, Sequence[SupportsIndex]] File ""/opt/python/3.7.1/lib/python3.7/typing.py"", line 251, in inner return func(*args, **kwds) File ""/opt/python/3.7.1/lib/python3.7/typing.py"", line 626, in __getitem__ params = tuple(_type_check(p, msg) for p in params) File ""/opt/python/3.7.1/lib/python3.7/typing.py"", line 626, in params = tuple(_type_check(p, msg) for p in params) File ""/opt/python/3.7.1/lib/python3.7/typing.py"", line 139, in _type_check raise TypeError(f""{msg} Got {arg!r:.100}."") TypeError: Parameters to generic types must be types. Got NotImplemented. The command ""python -c ""import xarray"""" exited with 1.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5566/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue