barronh / pseudonetcdf

PseudoNetCDF like NetCDF except for many scientific format backends
GNU Lesser General Public License v3.0
76 stars 35 forks source link

pending deprecations #115

Closed mathause closed 2 years ago

mathause commented 3 years ago

in xarray we get some deprecation warnings that stem from pseudonetcdf.

 /usr/share/miniconda/envs/xarray-tests/lib/python3.8/site-packages/PseudoNetCDF/icarttfiles/ffi1001.py:95:
DeprecationWarning: 'U' mode is deprecated
    f = openf(path, 'rU', encoding=encoding)

there are several uses of "rU" those, e.g.:

https://github.com/barronh/pseudonetcdf/blob/ddfa0c4bed7f2f320ce3b68aaffa979572ea60ff/src/PseudoNetCDF/icarttfiles/ffi1001.py#L65-L66

The suggestion seems to be to just use "r" (https://stackoverflow.com/questions/56791545/what-is-the-non-deprecated-version-of-open-u-mode)

I don't think it's urgent, just wanted to mention it here. xref pydata/xarray#3266

barronh commented 3 years ago

Thanks for the heads up! I'll fix these.

barronh commented 2 years ago

The rU has been changed to r in PR #116. timetuple should still be addressed.