Xarray: Ipython autocomplete raises a deprecation warning introduced in #1643.

Created on 31 Oct 2017  路  2Comments  路  Source: pydata/xarray

Code Sample, a copy-pastable example if possible

# Your code here
import xarray as xr
ds = xr.Dataset({'a': ('x', [0, 1, 2])})
ds. -> press 'Tab'

Problem description

IPython autocomplete raises a deprecation warning, introducing in #1643.

/home/keisukefujii/anaconda3/envs/tensorflow/lib/python3.5/site-packages/jedi/e.
  getattr(obj, name)
/home/keisukefujii/anaconda3/envs/tensorflow/lib/python3.5/site-packages/jedi/e.
  obj = getattr(obj, name)
In [3]: ds.

Expected Output

None

Output of xr.show_versions()

Paste the output here xr.show_versions() here

INSTALLED VERSIONS

commit: 2ef63bf0b199bacc310f448bf0d070a57b7fc043
python: 3.5.2.final.0
python-bits: 64
OS: Linux
OS-release: 4.4.0-97-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8

xarray: 0.9.6-32-g5122ee4
pandas: 0.20.3
numpy: 1.13.1
scipy: 0.19.0
netCDF4: None
h5netcdf: None
Nio: None
bottleneck: None
cyordereddict: None
dask: 0.15.4
matplotlib: 2.0.2
cartopy: None
seaborn: 0.7.1
setuptools: 36.2.7
pip: 9.0.1
conda: None
pytest: 3.0.7
IPython: 6.1.0
sphinx: 1.5.2

Most helpful comment

Probably the simplest thing to do is to explicitly remove 'T' from Dataset.__dir__(). That should keep it out of auto-complete.

All 2 comments

Probably the simplest thing to do is to explicitly remove 'T' from Dataset.__dir__(). That should keep it out of auto-complete.

Thanks. Sent a PR.

Was this page helpful?
0 / 5 - 0 ratings