diff --git a/.travis.yml b/.travis.yml index 868882657f6..83450f62ea5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,8 +24,6 @@ matrix: env: - CONDA_ENV=py36 - EXTRA_FLAGS="--run-flaky --run-network-tests" - - python: 3.6 - env: CONDA_ENV=py36-pydap - python: 3.6 env: CONDA_ENV=py36-netcdf4-dev addons: @@ -46,8 +44,6 @@ matrix: env: - CONDA_ENV=py36 - EXTRA_FLAGS="--run-flaky --run-network-tests" - - python: 3.6 - env: CONDA_ENV=py36-pydap - python: 3.6 env: CONDA_ENV=py36-netcdf4-dev addons: diff --git a/ci/requirements-py36-pydap.yml b/ci/requirements-py36-pydap.yml deleted file mode 100644 index c10bd93f928..00000000000 --- a/ci/requirements-py36-pydap.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: test_env -channels: - - conda-forge -dependencies: - - python=3.6 - - dask - - distributed - - h5py - - h5netcdf - - matplotlib - - netcdf4 - - pytest - - numpy - - scipy - - toolz - - pip: - - coveralls - - pytest-cov - - pydap diff --git a/ci/requirements-py36.yml b/ci/requirements-py36.yml index 5840a0157ba..3022c1a0886 100644 --- a/ci/requirements-py36.yml +++ b/ci/requirements-py36.yml @@ -19,3 +19,4 @@ dependencies: - pip: - coveralls - pytest-cov + - pydap diff --git a/doc/whats-new.rst b/doc/whats-new.rst index feae7ceac7e..dd3ceb54715 100644 --- a/doc/whats-new.rst +++ b/doc/whats-new.rst @@ -72,6 +72,9 @@ By `Keisuke Fujii `_. - ``DataArray.chunk()`` now accepts dask specific kwargs like ``Dataset.chunk()`` does. By `Fabien Maussion `_. +- Support for ``engine='pydap'`` with recent releases of Pydap (3.2.2+), + including on Python 3 (:issue:`1174`). + Documentation ~~~~~~~~~~~~~ diff --git a/xarray/backends/pydap_.py b/xarray/backends/pydap_.py index 09025589b44..a4ccbce5bc1 100644 --- a/xarray/backends/pydap_.py +++ b/xarray/backends/pydap_.py @@ -69,8 +69,8 @@ def open_store_variable(self, var): return Variable(var.dimensions, data, var.attributes) def get_variables(self): - return FrozenOrderedDict((k, self.open_store_variable(v)) - for k, v in self.ds.iteritems()) + return FrozenOrderedDict((k, self.open_store_variable(self.ds[k])) + for k in self.ds.keys()) def get_attrs(self): return Frozen(_fix_global_attributes(self.ds.attributes)) diff --git a/xarray/tests/test_backends.py b/xarray/tests/test_backends.py index 5401d0e3a60..dacb191584c 100644 --- a/xarray/tests/test_backends.py +++ b/xarray/tests/test_backends.py @@ -27,7 +27,7 @@ from . import (TestCase, requires_scipy, requires_netCDF4, requires_pydap, requires_scipy_or_netCDF4, requires_dask, requires_h5netcdf, requires_pynio, has_netCDF4, has_scipy, assert_allclose, - flaky, requires_rasterio, assert_identical) + flaky, network, requires_rasterio, assert_identical) from .test_dataset import create_test_data try: @@ -1361,6 +1361,7 @@ class DaskTestAutocloseTrue(DaskTest): autoclose = True +@network @requires_scipy_or_netCDF4 @requires_pydap class PydapTest(TestCase):