diff --git a/xarray/core/utils.py b/xarray/core/utils.py index 61372513b2a..00c84d4c10c 100644 --- a/xarray/core/utils.py +++ b/xarray/core/utils.py @@ -491,7 +491,7 @@ class FrozenMappingWarningOnValuesAccess(Frozen[K, V]): __slots__ = ("mapping",) def _warn(self) -> None: - warnings.warn( + emit_user_level_warning( "The return type of `Dataset.dims` will be changed to return a set of dimension names in future, " "in order to be more consistent with `DataArray.dims`. To access a mapping from dimension names to lengths, " "please use `Dataset.sizes`.",