Skip to content

Commit fb24e9c

Browse files
committed
Avoid raising deprecation warning now.
1 parent 2105aa0 commit fb24e9c

File tree

2 files changed

+24
-25
lines changed

2 files changed

+24
-25
lines changed

xarray/core/indexing.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from xarray.core.utils import (
2323
NDArrayMixin,
2424
either_dict_or_kwargs,
25-
emit_user_level_warning,
2625
get_valid_numpy_dtype,
2726
is_duck_array,
2827
is_duck_dask_array,
@@ -1142,10 +1141,10 @@ def explicit_indexing_adapter(
11421141

11431142
# If the array is not an ExplicitlyIndexedNDArrayMixin,
11441143
# it may wrap a BackendArray subclass that doesn't implement .oindex and .vindex. so use its __getitem__
1145-
emit_user_level_warning(
1146-
BackendArray_fallback_warning_message.format(""),
1147-
category=PendingDeprecationWarning,
1148-
)
1144+
# emit_user_level_warning(
1145+
# BackendArray_fallback_warning_message.format(""),
1146+
# category=PendingDeprecationWarning,
1147+
# )
11491148
raw_key, numpy_indices = decompose_indexer(key, shape, indexing_support)
11501149
result = raw_indexing_method(raw_key.tuple)
11511150
if numpy_indices.tuple:
@@ -1160,13 +1159,13 @@ def apply_indexer(
11601159
"""Apply an indexer to an indexable object."""
11611160
if not hasattr(indexable, "vindex") and not hasattr(indexable, "oindex"):
11621161
# This path is used by Lazily*IndexedArray.get_duck_array()
1163-
classname = type(indexable).__name__
1162+
# classname = type(indexable).__name__
11641163
# If the array is not an ExplicitlyIndexedNDArrayMixin,
11651164
# it may wrap a BackendArray subclass that doesn't implement .oindex and .vindex. so use its __getitem__
1166-
emit_user_level_warning(
1167-
BackendArray_fallback_warning_message.format(classname),
1168-
category=PendingDeprecationWarning,
1169-
)
1165+
# emit_user_level_warning(
1166+
# BackendArray_fallback_warning_message.format(classname),
1167+
# category=PendingDeprecationWarning,
1168+
# )
11701169
return indexable[indexer]
11711170

11721171
if isinstance(indexer, VectorizedIndexer):

xarray/tests/test_backends.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6534,25 +6534,25 @@ def roundtrip(self, ds: Dataset, *, open_kwargs=None) -> Dataset:
65346534
)
65356535
return ds
65366536

6537-
def test_vectorized_indexing_negative_step(self) -> None:
6538-
with pytest.warns(PendingDeprecationWarning):
6539-
super().test_vectorized_indexing_negative_step()
6537+
# def test_vectorized_indexing_negative_step(self) -> None:
6538+
# with pytest.warns(PendingDeprecationWarning):
6539+
# super().test_vectorized_indexing_negative_step()
65406540

6541-
def test_isel_dataarray(self) -> None:
6542-
with pytest.warns(PendingDeprecationWarning):
6543-
super().test_isel_dataarray()
6541+
# def test_isel_dataarray(self) -> None:
6542+
# with pytest.warns(PendingDeprecationWarning):
6543+
# super().test_isel_dataarray()
65446544

6545-
def test_vectorized_indexing(self) -> None:
6546-
with pytest.warns(PendingDeprecationWarning):
6547-
super().test_vectorized_indexing()
6545+
# def test_vectorized_indexing(self) -> None:
6546+
# with pytest.warns(PendingDeprecationWarning):
6547+
# super().test_vectorized_indexing()
65486548

6549-
def test_orthogonal_indexing(self) -> None:
6550-
with pytest.warns(PendingDeprecationWarning):
6551-
super().test_orthogonal_indexing()
6549+
# def test_orthogonal_indexing(self) -> None:
6550+
# with pytest.warns(PendingDeprecationWarning):
6551+
# super().test_orthogonal_indexing()
65526552

6553-
def test_outer_indexing_reversed(self) -> None:
6554-
with pytest.warns(PendingDeprecationWarning):
6555-
super().test_outer_indexing_reversed()
6553+
# def test_outer_indexing_reversed(self) -> None:
6554+
# with pytest.warns(PendingDeprecationWarning):
6555+
# super().test_outer_indexing_reversed()
65566556

65576557
return NewClass
65586558

0 commit comments

Comments
 (0)