Skip to content

Commit f382fd8

Browse files
authored
Push back finalizing deprecations for 0.12 (#2809)
0.12 will already have a big change in dropping Python 2.7 support. I'd rather wait a bit longer to finalize these deprecations to minimize the impact on users.
1 parent 81cedd6 commit f382fd8

File tree

5 files changed

+16
-12
lines changed

5 files changed

+16
-12
lines changed

xarray/backends/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ def open_dataset(filename_or_obj, group=None, decode_cf=True,
262262
warnings.warn(
263263
'The autoclose argument is no longer used by '
264264
'xarray.open_dataset() and is now ignored; it will be removed in '
265-
'xarray v0.12. If necessary, you can control the maximum number '
266-
'of simultaneous open files with '
265+
'a future version of xarray. If necessary, you can control the '
266+
'maximum number of simultaneous open files with '
267267
'xarray.set_options(file_cache_maxsize=...).',
268268
FutureWarning, stacklevel=2)
269269

xarray/core/groupby.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -616,8 +616,9 @@ def reduce(self, func, dim=None, axis=None,
616616
if self._obj.ndim > 1:
617617
warnings.warn(
618618
"Default reduction dimension will be changed to the "
619-
"grouped dimension after xarray 0.12. To silence this "
620-
"warning, pass dim=xarray.ALL_DIMS explicitly.",
619+
"grouped dimension in a future version of xarray. To "
620+
"silence this warning, pass dim=xarray.ALL_DIMS "
621+
"explicitly.",
621622
FutureWarning, stacklevel=2)
622623

623624
if keep_attrs is None:
@@ -731,8 +732,9 @@ def reduce(self, func, dim=None, keep_attrs=None, **kwargs):
731732
# the deprecation process. Do not forget to remove _reduce_method
732733
warnings.warn(
733734
"Default reduction dimension will be changed to the "
734-
"grouped dimension after xarray 0.12. To silence this "
735-
"warning, pass dim=xarray.ALL_DIMS explicitly.",
735+
"grouped dimension in a future version of xarray. To "
736+
"silence this warning, pass dim=xarray.ALL_DIMS "
737+
"explicitly.",
736738
FutureWarning, stacklevel=2)
737739
elif dim is None:
738740
dim = self._group_dim

xarray/core/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ def _check_inplace(inplace, default=False):
2020
inplace = default
2121
else:
2222
warnings.warn('The inplace argument has been deprecated and will be '
23-
'removed in xarray 0.12.0.', FutureWarning, stacklevel=3)
23+
'removed in a future version of xarray.',
24+
FutureWarning, stacklevel=3)
2425

2526
return inplace
2627

xarray/tests/test_dataarray.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2037,7 +2037,7 @@ def test_groupby_warning(self):
20372037
with pytest.warns(FutureWarning):
20382038
grouped.sum()
20392039

2040-
@pytest.mark.skipif(LooseVersion(xr.__version__) < LooseVersion('0.12'),
2040+
@pytest.mark.skipif(LooseVersion(xr.__version__) < LooseVersion('0.13'),
20412041
reason="not to forget the behavior change")
20422042
def test_groupby_sum_default(self):
20432043
array = self.make_groupby_example_array()

xarray/tutorial.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,17 @@ def open_dataset(name, cache=True, cache_dir=_default_cache_dir,
9191

9292
def load_dataset(*args, **kwargs):
9393
"""
94-
`load_dataset` will be removed in version 0.12. The current behavior of
95-
this function can be achived by using `tutorial.open_dataset(...).load()`.
94+
`load_dataset` will be removed a future version of xarray. The current
95+
behavior of this function can be achived by using
96+
`tutorial.open_dataset(...).load()`.
9697
9798
See Also
9899
--------
99100
open_dataset
100101
"""
101102
warnings.warn(
102-
"load_dataset` will be removed in xarray version 0.12. The current "
103-
"behavior of this function can be achived by using "
103+
"load_dataset` will be removed in a future version of xarray. The "
104+
"current behavior of this function can be achived by using "
104105
"`tutorial.open_dataset(...).load()`.",
105106
DeprecationWarning, stacklevel=2)
106107
return open_dataset(*args, **kwargs).load()

0 commit comments

Comments
 (0)