Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions xarray/backends/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ def open_dataset(filename_or_obj, group=None, decode_cf=True,
warnings.warn(
'The autoclose argument is no longer used by '
'xarray.open_dataset() and is now ignored; it will be removed in '
'xarray v0.12. If necessary, you can control the maximum number '
'of simultaneous open files with '
'a future version of xarray. If necessary, you can control the '
'maximum number of simultaneous open files with '
'xarray.set_options(file_cache_maxsize=...).',
FutureWarning, stacklevel=2)

Expand Down
10 changes: 6 additions & 4 deletions xarray/core/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,9 @@ def reduce(self, func, dim=None, axis=None,
if self._obj.ndim > 1:
warnings.warn(
"Default reduction dimension will be changed to the "
"grouped dimension after xarray 0.12. To silence this "
"warning, pass dim=xarray.ALL_DIMS explicitly.",
"grouped dimension in a future version of xarray. To "
"silence this warning, pass dim=xarray.ALL_DIMS "
"explicitly.",
FutureWarning, stacklevel=2)

if keep_attrs is None:
Expand Down Expand Up @@ -731,8 +732,9 @@ def reduce(self, func, dim=None, keep_attrs=None, **kwargs):
# the deprecation process. Do not forget to remove _reduce_method
warnings.warn(
"Default reduction dimension will be changed to the "
"grouped dimension after xarray 0.12. To silence this "
"warning, pass dim=xarray.ALL_DIMS explicitly.",
"grouped dimension in a future version of xarray. To "
"silence this warning, pass dim=xarray.ALL_DIMS "
"explicitly.",
FutureWarning, stacklevel=2)
elif dim is None:
dim = self._group_dim
Expand Down
3 changes: 2 additions & 1 deletion xarray/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def _check_inplace(inplace, default=False):
inplace = default
else:
warnings.warn('The inplace argument has been deprecated and will be '
'removed in xarray 0.12.0.', FutureWarning, stacklevel=3)
'removed in a future version of xarray.',
FutureWarning, stacklevel=3)

return inplace

Expand Down
2 changes: 1 addition & 1 deletion xarray/tests/test_dataarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -2037,7 +2037,7 @@ def test_groupby_warning(self):
with pytest.warns(FutureWarning):
grouped.sum()

@pytest.mark.skipif(LooseVersion(xr.__version__) < LooseVersion('0.12'),
@pytest.mark.skipif(LooseVersion(xr.__version__) < LooseVersion('0.13'),
reason="not to forget the behavior change")
def test_groupby_sum_default(self):
array = self.make_groupby_example_array()
Expand Down
9 changes: 5 additions & 4 deletions xarray/tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,17 @@ def open_dataset(name, cache=True, cache_dir=_default_cache_dir,

def load_dataset(*args, **kwargs):
"""
`load_dataset` will be removed in version 0.12. The current behavior of
this function can be achived by using `tutorial.open_dataset(...).load()`.
`load_dataset` will be removed a future version of xarray. The current
behavior of this function can be achived by using
`tutorial.open_dataset(...).load()`.

See Also
--------
open_dataset
"""
warnings.warn(
"load_dataset` will be removed in xarray version 0.12. The current "
"behavior of this function can be achived by using "
"load_dataset` will be removed in a future version of xarray. The "
"current behavior of this function can be achived by using "
"`tutorial.open_dataset(...).load()`.",
DeprecationWarning, stacklevel=2)
return open_dataset(*args, **kwargs).load()