Skip to content

Commit 4042d2c

Browse files
committed
Merge branch 'main' into minimize-ci
* main: Delete pynio backend. (pydata#8971)
2 parents 0fc1465 + 8a23e24 commit 4042d2c

File tree

10 files changed

+17
-250
lines changed

10 files changed

+17
-250
lines changed

.binder/environment.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ dependencies:
2828
- pip
2929
- pooch
3030
- pydap
31-
- pynio
3231
- rasterio
3332
- scipy
3433
- seaborn

doc/getting-started-guide/installing.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ For netCDF and IO
3131
- `pydap <https://www.pydap.org>`__: used as a fallback for accessing OPeNDAP
3232
- `h5netcdf <https://github.com/h5netcdf/h5netcdf>`__: an alternative library for
3333
reading and writing netCDF4 files that does not use the netCDF-C libraries
34-
- `PyNIO <https://www.pyngl.ucar.edu/Nio.shtml>`__: for reading GRIB and other
35-
geoscience specific file formats. Note that PyNIO is not available for Windows and
36-
that the PyNIO backend may be moved outside of xarray in the future.
3734
- `zarr <https://zarr.readthedocs.io>`__: for chunked, compressed, N-dimensional arrays.
3835
- `cftime <https://unidata.github.io/cftime>`__: recommended if you
3936
want to encode/decode datetimes for non-standard calendars or dates before

doc/user-guide/io.rst

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,27 +1294,6 @@ We recommend installing cfgrib via conda::
12941294

12951295
.. _cfgrib: https://github.com/ecmwf/cfgrib
12961296

1297-
.. _io.pynio:
1298-
1299-
Formats supported by PyNIO
1300-
--------------------------
1301-
1302-
.. warning::
1303-
1304-
The `PyNIO backend is deprecated`_. `PyNIO is no longer maintained`_.
1305-
1306-
Xarray can also read GRIB, HDF4 and other file formats supported by PyNIO_,
1307-
if PyNIO is installed. To use PyNIO to read such files, supply
1308-
``engine='pynio'`` to :py:func:`open_dataset`.
1309-
1310-
We recommend installing PyNIO via conda::
1311-
1312-
conda install -c conda-forge pynio
1313-
1314-
.. _PyNIO: https://www.pyngl.ucar.edu/Nio.shtml
1315-
.. _PyNIO backend is deprecated: https://github.com/pydata/xarray/issues/4491
1316-
.. _PyNIO is no longer maintained: https://github.com/NCAR/pynio/issues/53
1317-
13181297

13191298
CSV and other formats supported by pandas
13201299
-----------------------------------------

doc/whats-new.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ New Features
3232

3333
Breaking changes
3434
~~~~~~~~~~~~~~~~
35+
- The PyNIO backend has been deleted (:issue:`4491`, :pull:`7301`).
36+
By `Deepak Cherian <https://github.com/dcherian>`_.
3537

3638

3739
Bug fixes
@@ -6806,8 +6808,7 @@ Enhancements
68066808
datasets with a MultiIndex to a netCDF file. User contributions in this
68076809
area would be greatly appreciated.
68086810

6809-
- Support for reading GRIB, HDF4 and other file formats via PyNIO_. See
6810-
:ref:`io.pynio` for more details.
6811+
- Support for reading GRIB, HDF4 and other file formats via PyNIO_.
68116812
- Better error message when a variable is supplied with the same name as
68126813
one of its dimensions.
68136814
- Plotting: more control on colormap parameters (:issue:`642`). ``vmin`` and

xarray/backends/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from xarray.backends.netCDF4_ import NetCDF4BackendEntrypoint, NetCDF4DataStore
1616
from xarray.backends.plugins import list_engines, refresh_engines
1717
from xarray.backends.pydap_ import PydapBackendEntrypoint, PydapDataStore
18-
from xarray.backends.pynio_ import NioDataStore
1918
from xarray.backends.scipy_ import ScipyBackendEntrypoint, ScipyDataStore
2019
from xarray.backends.store import StoreBackendEntrypoint
2120
from xarray.backends.zarr import ZarrBackendEntrypoint, ZarrStore
@@ -30,7 +29,6 @@
3029
"InMemoryDataStore",
3130
"NetCDF4DataStore",
3231
"PydapDataStore",
33-
"NioDataStore",
3432
"ScipyDataStore",
3533
"H5NetCDFStore",
3634
"ZarrStore",

xarray/backends/api.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
T_NetcdfEngine = Literal["netcdf4", "scipy", "h5netcdf"]
6262
T_Engine = Union[
6363
T_NetcdfEngine,
64-
Literal["pydap", "pynio", "zarr"],
64+
Literal["pydap", "zarr"],
6565
type[BackendEntrypoint],
6666
str, # no nice typing support for custom backends
6767
None,
@@ -79,7 +79,6 @@
7979
"scipy": backends.ScipyDataStore,
8080
"pydap": backends.PydapDataStore.open,
8181
"h5netcdf": backends.H5NetCDFStore.open,
82-
"pynio": backends.NioDataStore,
8382
"zarr": backends.ZarrStore.open_group,
8483
}
8584

@@ -420,8 +419,8 @@ def open_dataset(
420419
ends with .gz, in which case the file is gunzipped and opened with
421420
scipy.io.netcdf (only netCDF3 supported). Byte-strings or file-like
422421
objects are opened by scipy.io.netcdf (netCDF3) or h5py (netCDF4/HDF).
423-
engine : {"netcdf4", "scipy", "pydap", "h5netcdf", "pynio", \
424-
"zarr", None}, installed backend \
422+
engine : {"netcdf4", "scipy", "pydap", "h5netcdf", "zarr", None}\
423+
, installed backend \
425424
or subclass of xarray.backends.BackendEntrypoint, optional
426425
Engine to use when reading files. If not provided, the default engine
427426
is chosen based on available dependencies, with a preference for
@@ -523,7 +522,7 @@ def open_dataset(
523522
relevant when using dask or another form of parallelism. By default,
524523
appropriate locks are chosen to safely read and write files with the
525524
currently active dask scheduler. Supported by "netcdf4", "h5netcdf",
526-
"scipy", "pynio".
525+
"scipy".
527526
528527
See engine open function for kwargs accepted by each specific engine.
529528
@@ -627,8 +626,8 @@ def open_dataarray(
627626
ends with .gz, in which case the file is gunzipped and opened with
628627
scipy.io.netcdf (only netCDF3 supported). Byte-strings or file-like
629628
objects are opened by scipy.io.netcdf (netCDF3) or h5py (netCDF4/HDF).
630-
engine : {"netcdf4", "scipy", "pydap", "h5netcdf", "pynio", \
631-
"zarr", None}, installed backend \
629+
engine : {"netcdf4", "scipy", "pydap", "h5netcdf", "zarr", None}\
630+
, installed backend \
632631
or subclass of xarray.backends.BackendEntrypoint, optional
633632
Engine to use when reading files. If not provided, the default engine
634633
is chosen based on available dependencies, with a preference for
@@ -728,7 +727,7 @@ def open_dataarray(
728727
relevant when using dask or another form of parallelism. By default,
729728
appropriate locks are chosen to safely read and write files with the
730729
currently active dask scheduler. Supported by "netcdf4", "h5netcdf",
731-
"scipy", "pynio".
730+
"scipy".
732731
733732
See engine open function for kwargs accepted by each specific engine.
734733
@@ -897,8 +896,8 @@ def open_mfdataset(
897896
If provided, call this function on each dataset prior to concatenation.
898897
You can find the file-name from which each dataset was loaded in
899898
``ds.encoding["source"]``.
900-
engine : {"netcdf4", "scipy", "pydap", "h5netcdf", "pynio", \
901-
"zarr", None}, installed backend \
899+
engine : {"netcdf4", "scipy", "pydap", "h5netcdf", "zarr", None}\
900+
, installed backend \
902901
or subclass of xarray.backends.BackendEntrypoint, optional
903902
Engine to use when reading files. If not provided, the default engine
904903
is chosen based on available dependencies, with a preference for

xarray/backends/pynio_.py

Lines changed: 0 additions & 164 deletions
This file was deleted.

xarray/tests/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ def _importorskip(
9999
)
100100

101101
has_h5netcdf, requires_h5netcdf = _importorskip("h5netcdf")
102-
has_pynio, requires_pynio = _importorskip("Nio")
103102
has_cftime, requires_cftime = _importorskip("cftime")
104103
has_dask, requires_dask = _importorskip("dask")
105104
with warnings.catch_warnings():

0 commit comments

Comments
 (0)