• Bug#1100293: python-xarray: FTBFS: E RuntimeWarning: invalid value enco

    From Santiago Vila@21:1/5 to All on Wed Mar 12 17:40:09 2025
    Package: src:python-xarray
    Version: 2025.01.2-1
    Severity: serious
    Tags: ftbfs trixie sid

    Dear maintainer:

    During a rebuild of all packages in unstable, your package failed to build:

    --------------------------------------------------------------------------------
    [...]
    debian/rules clean
    dh clean --buildsystem=pybuild --with python3
    debian/rules override_dh_auto_clean
    make[1]: Entering directory '/<<PKGBUILDDIR>>'
    dh_auto_clean
    pybuild --clean -i python{version} -p 3.13
    I: pybuild base:311: python3.13 setup.py clean /usr/lib/python3/dist-packages/setuptools_scm/_integration/setuptools.py:92: UserWarning: version of None already set
    warnings.warn(f"version of {dist_name} already set") /usr/lib/python3/dist-packages/setuptools/dist.py:330: InformationOnly: Normalizing '2025.01.2' to '2025.1.2'
    self.metadata.version = self._normalize_version(self.metadata.version) running clean
    removing '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_xarray/build' (and everything under it)
    'build/bdist.linux-x86_64' does not exist -- can't clean it

    [... snipped ...]

    else:
    raise ValueError(
    f"unknown setting for chunked array handling in apply_ufunc: {dask}"
    )
    else:
    if vectorize:
    func = _vectorize(
    func, signature, output_dtypes=output_dtypes, exclude_dims=exclude_dims
    )

    result_data = func(*input_data)
    E RuntimeWarning: invalid value encountered in sqrt

    xarray/core/computation.py:824: RuntimeWarning
    ______________ test_weighted_operations_keep_attr[None-False-std] ______________

    operation = 'std', as_dataset = False, keep_attrs = None

    @pytest.mark.parametrize(
    "operation",
    ("sum_of_weights", "sum", "mean", "sum_of_squares", "var", "std", "quantile"),
    )
    @pytest.mark.parametrize("as_dataset", (True, False))
    @pytest.mark.parametrize("keep_attrs", (True, False, None))
    def test_weighted_operations_keep_attr(operation, as_dataset, keep_attrs):
    weights = DataArray(np.random.randn(2, 2), attrs=dict(attr="weights"))
    data = DataArray(np.random.randn(2, 2))

    if as_dataset:
    data = data.to_dataset(name="data")

    data.attrs = dict(attr="weights")

    kwargs = {"keep_attrs": keep_attrs}
    if operation == "quantile":
    kwargs["q"] = 0.5

    result = getattr(data.weighted(weights), operation)(**kwargs)

    xarray/tests/test_weighted.py:743:
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ xarray/core/weighted.py:517: in std
    return self._implementation(
    xarray/core/weighted.py:546: in _implementation
    dataset = dataset.map(func, dim=dim, **kwargs)
    xarray/core/dataset.py:7172: in map
    k: maybe_wrap_array(v, func(v, *args, **kwargs)) xarray/core/weighted.py:316: in _weighted_std
    return cast("T_DataArray", np.sqrt(self._weighted_var(da, dim, skipna))) xarray/core/arithmetic.py:83: in __array_ufunc__
    return apply_ufunc(
    xarray/core/computation.py:1271: in apply_ufunc
    return apply_dataarray_vfunc(
    xarray/core/computation.py:313: in apply_dataarray_vfunc
    result_var = func(*data_vars)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    func = <ufunc 'sqrt'>, signature = _UFuncSignature([()], [()])
    exclude_dims = frozenset(), dask = 'allowed', output_dtypes = None

    def apply_variable_ufunc(
    func,
    *args,
    signature: _UFuncSignature,
    exclude_dims=frozenset(),
    dask="forbidden",
    output_dtypes=None,
    vectorize=False,
    keep_attrs="override",
    dask_gufunc_kwargs=None,
    ) -> Variable | tuple[Variable, ...]:
    """Apply a ndarray level function over Variable and/or ndarray objects."""
    from xarray.core.formatting import short_array_repr
    from xarray.core.variable import Variable, as_compatible_data

    dim_sizes = unified_dim_sizes(
    (a for a in args if hasattr(a, "dims")), exclude_dims=exclude_dims
    )
    broadcast_dims = tuple(
    dim for dim in dim_sizes if dim not in signature.all_core_dims
    )
    output_dims = [broadcast_dims + out for out in signature.output_core_dims]

    input_data = [
    (
    broadcast_compat_data(arg, broadcast_dims, core_dims)
    if isinstance(arg, Variable)
    else arg
    )
    for arg, core_dims in zip(args, signature.input_core_dims, strict=True)
    ]

    if any(is_chunked_array(array) for array in input_data):
    if dask == "forbidden":
    raise ValueError(
    "apply_ufunc encountered a chunked array on an "
    "argument, but handling for chunked arrays has not "
    "been enabled. Either set the ``dask`` argument "
    "or load your data into memory first with "
    "``.load()`` or ``.compute()``"
    )
    elif dask == "parallelized":
    chunkmanager = get_chunked_array_type(*input_data)

    numpy_func = func

    if dask_gufunc_kwargs is None:
    dask_gufunc_kwargs = {}
    else:
    dask_gufunc_kwargs = dask_gufunc_kwargs.copy()

    allow_rechunk = dask_gufunc_kwargs.get("allow_rechunk", None)
    if allow_rechunk is None:
    for n, (data, core_dims) in enumerate(
    zip(input_data, signature.input_core_dims, strict=True)
    ):
    if is_chunked_array(data):
    # core dimensions cannot span multiple chunks
    for axis, dim in enumerate(core_dims, start=-len(core_dims)):
    if len(data.chunks[axis]) != 1:
    raise ValueError(
    f"dimension {dim} on {n}th function argument to "
    "apply_ufunc with dask='parallelized' consists of "
    "multiple chunks, but is also a core dimension. To "
    "fix, either rechunk into a single array chunk along "
    f"this dimension, i.e., ``.chunk(dict({dim}=-1))``, or "
    "pass ``allow_rechunk=True`` in ``dask_gufunc_kwargs`` "
    "but beware that this may significantly increase memory usage."
    )
    dask_gufunc_kwargs["allow_rechunk"] = True

    output_sizes = dask_gufunc_kwargs.pop("output_sizes", {})
    if output_sizes:
    output_sizes_renamed = {}
    for key, value in output_sizes.items():
    if key not in signature.all_output_core_dims:
    raise ValueError(
    f"dimension '{key}' in 'output_sizes' must correspond to output_core_dims"
    )
    output_sizes_renamed[signature.dims_map[key]] = value
    dask_gufunc_kwargs["output_sizes"] = output_sizes_renamed

    for key in signature.all_output_core_dims:
    if (
    key not in signature.all_input_core_dims or key in exclude_dims
    ) and key not in output_sizes:
    raise ValueError(
    f"dimension '{key}' in 'output_core_dims' needs corresponding (dim, size) in 'output_sizes'"
    )

    def func(*arrays):
    res = chunkmanager.apply_gufunc(
    numpy_func,
    signature.to_gufunc_string(exclude_dims),
    *arrays,
    vectorize=vectorize,
    output_dtypes=output_dtypes,
    **dask_gufunc_kwargs,
    )

    return res

    elif dask == "allowed":
    pass
    else:
    raise ValueError(
    f"unknown setting for chunked array handling in apply_ufunc: {dask}"
    )
    else:
    if vectorize:
    func = _vectorize(
    func, signature, output_dtypes=output_dtypes, exclude_dims=exclude_dims
    )

    result_data = func(*input_data)
    E RuntimeWarning: invalid value encountered in sqrt

    xarray/core/computation.py:824: RuntimeWarning
    _______________ test_weighted_operations_keep_attr_da_in_ds[std] _______________

    operation = 'std'

    @pytest.mark.parametrize(
    "operation",
    ("sum_of_weights", "sum", "mean", "sum_of_squares", "var", "std", "quantile"),
    )
    def test_weighted_operations_keep_attr_da_in_ds(operation):
    # GH #3595

    weights = DataArray(np.random.randn(2, 2))
    data = DataArray(np.random.randn(2, 2), attrs=dict(attr="data"))
    data = data.to_dataset(name="a")

    kwargs = {"keep_attrs": True}
    if operation == "quantile":
    kwargs["q"] = 0.5

    result = getattr(data.weighted(weights), operation)(**kwargs)

    xarray/tests/test_weighted.py:768:
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ xarray/core/weighted.py:517: in std
    return self._implementation(
    xarray/core/weighted.py:554: in _implementation
    return self.obj.map(func, dim=dim, **kwargs)
    xarray/core/dataset.py:7172: in map
    k: maybe_wrap_array(v, func(v, *args, **kwargs)) xarray/core/weighted.py:316: in _weighted_std
    return cast("T_DataArray", np.sqrt(self._weighted_var(da, dim, skipna))) xarray/core/arithmetic.py:83: in __array_ufunc__
    return apply_ufunc(
    xarray/core/computation.py:1271: in apply_ufunc
    return apply_dataarray_vfunc(
    xarray/core/computation.py:313: in apply_dataarray_vfunc
    result_var = func(*data_vars)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    func = <ufunc 'sqrt'>, signature = _UFuncSignature([()], [()])
    exclude_dims = frozenset(), dask = 'allowed', output_dtypes = None

    def apply_variable_ufunc(
    func,
    *args,
    signature: _UFuncSignature,
    exclude_dims=frozenset(),
    dask="forbidden",
    output_dtypes=None,
    vectorize=False,
    keep_attrs="override",
    dask_gufunc_kwargs=None,
    ) -> Variable | tuple[Variable, ...]:
    """Apply a ndarray level function over Variable and/or ndarray objects."""
    from xarray.core.formatting import short_array_repr
    from xarray.core.variable import Variable, as_compatible_data

    dim_sizes = unified_dim_sizes(
    (a for a in args if hasattr(a, "dims")), exclude_dims=exclude_dims
    )
    broadcast_dims = tuple(
    dim for dim in dim_sizes if dim not in signature.all_core_dims
    )
    output_dims = [broadcast_dims + out for out in signature.output_core_dims]

    input_data = [
    (
    broadcast_compat_data(arg, broadcast_dims, core_dims)
    if isinstance(arg, Variable)
    else arg
    )
    for arg, core_dims in zip(args, signature.input_core_dims, strict=True)
    ]

    if any(is_chunked_array(array) for array in input_data):
    if dask == "forbidden":
    raise ValueError(
    "apply_ufunc encountered a chunked array on an "
    "argument, but handling for chunked arrays has not "
    "been enabled. Either set the ``dask`` argument "
    "or load your data into memory first with "
    "``.load()`` or ``.compute()``"
    )
    elif dask == "parallelized":
    chunkmanager = get_chunked_array_type(*input_data)

    numpy_func = func

    if dask_gufunc_kwargs is None:
    dask_gufunc_kwargs = {}
    else:
    dask_gufunc_kwargs = dask_gufunc_kwargs.copy()

    allow_rechunk = dask_gufunc_kwargs.get("allow_rechunk", None)
    if allow_rechunk is None:
    for n, (data, core_dims) in enumerate(
    zip(input_data, signature.input_core_dims, strict=True)
    ):
    if is_chunked_array(data):
    # core dimensions cannot span multiple chunks
    for axis, dim in enumerate(core_dims, start=-len(core_dims)):
    if len(data.chunks[axis]) != 1:
    raise ValueError(
    f"dimension {dim} on {n}th function argument to "
    "apply_ufunc with dask='parallelized' consists of "
    "multiple chunks, but is also a core dimension. To "
    "fix, either rechunk into a single array chunk along "
    f"this dimension, i.e., ``.chunk(dict({dim}=-1))``, or "
    "pass ``allow_rechunk=True`` in ``dask_gufunc_kwargs`` "
    "but beware that this may significantly increase memory usage."
    )
    dask_gufunc_kwargs["allow_rechunk"] = True

    output_sizes = dask_gufunc_kwargs.pop("output_sizes", {})
    if output_sizes:
    output_sizes_renamed = {}
    for key, value in output_sizes.items():
    if key not in signature.all_output_core_dims:
    raise ValueError(
    f"dimension '{key}' in 'output_sizes' must correspond to output_core_dims"
    )
    output_sizes_renamed[signature.dims_map[key]] = value
    dask_gufunc_kwargs["output_sizes"] = output_sizes_renamed

    for key in signature.all_output_core_dims:
    if (
    key not in signature.all_input_core_dims or key in exclude_dims
    ) and key not in output_sizes:
    raise ValueError(
    f"dimension '{key}' in 'output_core_dims' needs corresponding (dim, size) in 'output_sizes'"
    )

    def func(*arrays):
    res = chunkmanager.apply_gufunc(
    numpy_func,
    signature.to_gufunc_string(exclude_dims),
    *arrays,
    vectorize=vectorize,
    output_dtypes=output_dtypes,
    **dask_gufunc_kwargs,
    )

    return res

    elif dask == "allowed":
    pass
    else:
    raise ValueError(
    f"unknown setting for chunked array handling in apply_ufunc: {dask}"
    )
    else:
    if vectorize:
    func = _vectorize(
    func, signature, output_dtypes=output_dtypes, exclude_dims=exclude_dims
    )

    result_data = func(*input_data)
    E RuntimeWarning: invalid value encountered in sqrt

    xarray/core/computation.py:824: RuntimeWarning
    =============================== warnings summary ===============================
    xarray/tests/test_backends.py: 722 warnings
    /usr/lib/python3/dist-packages/zarr/api/asynchronous.py:203: UserWarning: Consolidated metadata is currently not part in the Zarr format 3 specification. It may not be supported by other zarr implementations and may change in the future.
    warnings.warn(

    xarray/tests/test_backends.py: 896 warnings
    /usr/lib/python3/dist-packages/zarr/codecs/vlen_utf8.py:44: UserWarning: The codec `vlen-utf8` is currently not part in the Zarr format 3 specification. It may not be supported by other zarr implementations and may change in the future.
    return cls(**configuration_parsed)

    xarray/tests/test_backends.py: 171 warnings
    /usr/lib/python3/dist-packages/zarr/core/array.py:3989: UserWarning: The dtype `<U1` is currently not part in the Zarr format 3 specification. It may not be supported by other zarr implementations and may change in the future.
    meta = AsyncArray._create_metadata_v3(

    xarray/tests/test_backends.py: 217 warnings
    /usr/lib/python3/dist-packages/zarr/codecs/vlen_utf8.py:99: UserWarning: The codec `vlen-bytes` is currently not part in the Zarr format 3 specification. It may not be supported by other zarr implementations and may change in the future.
    return cls(**configuration_parsed)

    xarray/tests/test_backends.py::TestZarrDictStore::test_zero_dimensional_variable[3]
    xarray/tests/test_backends.py::TestZarrDirectoryStore::test_zero_dimensional_variable[3]
    xarray/tests/test_backends.py::TestZarrWriteEmpty::test_zero_dimensional_variable[3]
    /usr/lib/python3/dist-packages/zarr/core/array.py:3989: UserWarning: The dtype `|S6` is currently not part in the Zarr format 3 specification. It may not be supported by other zarr implementations and may change in the future.
    meta = AsyncArray._create_metadata_v3(

    xarray/tests/test_backends.py::TestZarrDictStore::test_zero_dimensional_variable[3]
    xarray/tests/test_backends.py::TestZarrDirectoryStore::test_zero_dimensional_variable[3]
    xarray/tests/test_backends.py::TestZarrWriteEmpty::test_zero_dimensional_variable[3]
    /usr/lib/python3/dist-packages/zarr/core/array.py:3989: UserWarning: The dtype `<U6` is currently not part in the Zarr format 3 specification. It may not be supported by other zarr implementations and may change in the future.
    meta = AsyncArray._create_metadata_v3(

    xarray/tests/test_backends.py: 18 warnings
    /usr/lib/python3/dist-packages/zarr/core/array.py:3989: UserWarning: The dtype `|S4` is currently not part in the Zarr format 3 specification. It may not be supported by other zarr implementations and may change in the future.
    meta = AsyncArray._create_metadata_v3(

    xarray/tests/test_backends.py: 48 warnings
    /usr/lib/python3/dist-packages/zarr/core/array.py:3989: UserWarning: The dtype `StringDType()` is currently not part in the Zarr format 3 specification. It may not be supported by other zarr implementations and may change in the future.
    meta = AsyncArray._create_metadata_v3(

    xarray/tests/test_backends.py::TestZarrDictStore::test_roundtrip_string_data[3] xarray/tests/test_backends.py::TestZarrDirectoryStore::test_roundtrip_string_data[3]
    xarray/tests/test_backends.py::TestZarrWriteEmpty::test_roundtrip_string_data[3]
    /usr/lib/python3/dist-packages/zarr/core/array.py:3989: UserWarning: The dtype `<U4` is currently not part in the Zarr format 3 specification. It may not be supported by other zarr implementations and may change in the future.
    meta = AsyncArray._create_metadata_v3(

    xarray/tests/test_backends.py: 33 warnings
    /usr/lib/python3/dist-packages/zarr/core/array.py:3989: UserWarning: The dtype `<U2` is currently not part in the Zarr format 3 specification. It may not be supported by other zarr implementations and may change in the future.
    meta = AsyncArray._create_metadata_v3(

    xarray/tests/test_backends.py: 33 warnings
    /usr/lib/python3/dist-packages/zarr/core/array.py:3989: UserWarning: The dtype `|S2` is currently not part in the Zarr format 3 specification. It may not be supported by other zarr implementations and may change in the future.
    meta = AsyncArray._create_metadata_v3(

    xarray/tests/test_backends.py::TestH5NetCDFFileObject::test_open_fileobj
    /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored in: <function CachingFileManager.__del__ at 0x7f4a3f4bafc0>

    Traceback (most recent call last):
    File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_xarray/build/xarray/backends/file_manager.py", line 255, in __del__
    warnings.warn(
    ~~~~~~~~~~~~~^
    f"deallocating {self}, but file is not already closed. "
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<2 lines>...
    stacklevel=2,
    ^^^^^^^^^^^^^
    )
    ^
    RuntimeWarning: deallocating CachingFileManager(<class 'h5netcdf.core.File'>, <_io.BufferedReader name='/tmp/tmpo1h3uc_h/temp-2487.nc'>, mode='r', kwargs={'invalid_netcdf': None, 'decode_vlen_strings': True, 'driver': None}, manager_id='58f3b5b1-d353-
    4530-a4b1-d54ea76f5452'), but file is not already closed. This may indicate a bug.

    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

    xarray/tests/test_backends.py::test_h5netcdf_storage_options
    /usr/lib/python3/dist-packages/_pytest/python.py:159: RuntimeWarning: deallocating CachingFileManager(<class 'h5netcdf.core.File'>, <fsspec.implementations.local.LocalFileOpener object at 0x7f4a2a2625f0>, mode='r', kwargs={'invalid_netcdf': None, '
    decode_vlen_strings': True, 'driver': None}, manager_id='5b831278-e650-4485-835b-9372ce9ae114'), but file is not already closed. This may indicate a bug.
    result = testfunction(**testargs)

    xarray/tests/test_backends.py::test_h5netcdf_storage_options
    /usr/lib/python3/dist-packages/_pytest/python.py:159: RuntimeWarning: deallocating CachingFileManager(<class 'h5netcdf.core.File'>, <fsspec.implementations.local.LocalFileOpener object at 0x7f4a2a263100>, mode='r', kwargs={'invalid_netcdf': None, '
    decode_vlen_strings': True, 'driver': None}, manager_id='4b681f13-bb3a-48e9-80af-2783a46dd492'), but file is not already closed. This may indicate a bug.
    result = testfunction(**testargs)

    xarray/tests/test_coding_times.py::test_roundtrip_datetime64_nanosecond_precision[1677-09-21T00:12:43.145225-us-int64-None-False]
    xarray/tests/test_coding_times.py::test_roundtrip_datetime64_nanosecond_precision[1970-01-01T00:00:01.000001-us-int64-None-False]
    /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_xarray/build/xarray/tests/test_coding_times.py:1295: UserWarning: Converting non-nanosecond precision datetime values to nanosecond precision. This behavior can eventually be relaxed in xarray, as it is an
    artifact from pandas which is now beginning to support non-nanosecond precision values. This warning is caused by passing non-nanosecond np.datetime64 or np.timedelta64 values to the DataArray or Variable constructor; it can be silenced by converting the
    values to nanosecond precision ahead of time.
    var = Variable(["time"], times, encoding=encoding)

    xarray/tests/test_computation.py::test_unified_dim_sizes
    /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_xarray/build/xarray/namedarray/core.py:264: UserWarning: Duplicate dimension names present: dimensions {'x'} appear more than once in dims=('x', 'x'). We do not yet support duplicate dimension names, but we do
    allow initial construction of the object. We recommend you rename the dims immediately to become distinct, as most xarray functionality is likely to fail silently if you do not. To rename the dimensions you will need to set the ``.dims`` attribute of
    each variable, ``e.g. var.dims=('x0', 'x1')``.
    self._dims = self._parse_dimensions(dims)

    xarray/tests/test_conventions.py: 1 warning
    xarray/tests/test_dataset.py: 1 warning
    xarray/tests/test_rolling.py: 36 warnings
    /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_xarray/build/xarray/core/duck_array_ops.py:234: RuntimeWarning: invalid value encountered in cast
    return data.astype(dtype, **kwargs)

    xarray/tests/test_dask.py: 12 warnings
    /usr/lib/python3/dist-packages/numpy/_core/numeric.py:442: RuntimeWarning: invalid value encountered in cast
    multiarray.copyto(res, fill_value, casting='unsafe')

    xarray/tests/test_dataset.py::TestDataset::test_to_and_from_dict_with_nan_nat[array]
    /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_xarray/build/xarray/tests/test_dataset.py:5170: UserWarning: Converting non-nanosecond precision datetime values to nanosecond precision. This behavior can eventually be relaxed in xarray, as it is an artifact
    from pandas which is now beginning to support non-nanosecond precision values. This warning is caused by passing non-nanosecond np.datetime64 or np.timedelta64 values to the DataArray or Variable constructor; it can be silenced by converting the values
    to nanosecond precision ahead of time.
    roundtripped = Dataset.from_dict(ds.to_dict(data=data))

    xarray/tests/test_duck_array_ops.py::test_cftime_datetime_mean[True]
    /usr/lib/python3/dist-packages/dask/array/core.py:5083: DeprecationWarning: Bitwise inversion '~' on bool is deprecated and will be removed in Python 3.16. This returns the bitwise inversion of the underlying int object and is usually not what you
    expect from negating a bool. Use the 'not' operator for boolean negation or ~int(x) if you really want the bitwise inversion of the underlying int.
    result = function(*args, **kwargs)

    xarray/tests/test_strategies.py: 10 warnings
    /usr/lib/python3/dist-packages/numpy/_core/fromnumeric.py:86: RuntimeWarning: invalid value encountered in reduce
    return ufunc.reduce(obj, axis, dtype, out, **passkwargs)

    xarray/tests/test_strategies.py::TestReduction::test_mean xarray/tests/test_strategies.py::TestReduction::test_mean xarray/tests/test_strategies.py::TestReduction::test_mean
    /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_xarray/build/xarray/tests/test_strategies.py:277: RuntimeWarning: Mean of empty slice
    expected = np.nanmean(var.data, axis=reduction_axes)

    xarray/tests/test_variable.py::TestIndexVariable::test_to_index_multiindex_level
    /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_xarray/build/xarray/tests/test_variable.py:2435: FutureWarning: the `pandas.MultiIndex` object(s) passed as 'x' coordinate(s) or data variable(s) will no longer be implicitly promoted and wrapped into multiple
    indexed coordinates in the future (i.e., one coordinate for each multi-index level + one dimension coordinate). If you want to keep this behavior, you need to first wrap it explicitly using `mindex_coords = xarray.Coordinates.from_pandas_multiindex(
    mindex_obj, 'dim')` and pass it as coordinates, e.g., `xarray.Dataset(coords=mindex_coords)`, `dataset.assign_coords(mindex_coords)` or `dataarray.assign_coords(mindex_coords)`.
    ds = Dataset(coords={"x": midx})

    xarray/tests/test_weighted.py::test_weighted_quantile_3D[None-True-q1-a] xarray/tests/test_weighted.py::test_weighted_quantile_3D[None-True-q2-a]
    /usr/lib/python3/dist-packages/numpy/lib/_nanfunctions_impl.py:1620: RuntimeWarning: All-NaN slice encountered
    return fnb._ureduce(a,

    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================
    FAILED xarray/tests/test_backends.py::TestZarrDictStore::test_hidden_zarr_keys[2]
    FAILED xarray/tests/test_backends.py::TestZarrDirectoryStore::test_hidden_zarr_keys[2]
    FAILED xarray/tests/test_backends.py::TestZarrWriteEmpty::test_hidden_zarr_keys[2]
    FAILED xarray/tests/test_groupby.py::test_dask_da_groupby_quantile - Failed: ...
    FAILED xarray/tests/test_weighted.py::test_weighted_operations_keep_attr[False-True-std]
    FAILED xarray/tests/test_weighted.py::test_weighted_operations_keep_attr[False-False-std]
    FAILED xarray/tests/test_weighted.py::test_weighted_operations_keep_attr[None-True-std]
    FAILED xarray/tests/test_weighted.py::test_weighted_operations_keep_attr[None-False-std]
    FAILED xarray/tests/test_weighted.py::test_weighted_operations_keep_attr_da_in_ds[std]
    = 9 failed, 16789 passed, 1293 skipped, 73 xfailed, 107 xpassed, 2221 warnings in 234.58s (0:03:54) =
    E: pybuild pybuild:389: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_xarray/build; python3.13 -m pytest
    # cleanup after tests
    find . -name 'tmp.zarr*' -delete
    find: cannot delete ‘./.pybuild/cpython3_3.13_xarray/build/tmp.zarr.zip’: Directory not empty
    make[1]: *** [debian/rules:43: override_dh_auto_test] Error 1
    make[1]: Leaving directory '/<<PKGBUILDDIR>>'
    make: *** [debian/rules:19: binary] Error 2
    dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 --------------------------------------------------------------------------------

    The above is just how the build ends and not necessarily the most relevant part.
    If required, the full build log is available here:

    https://people.debian.org/~sanvila/build-logs/202503/

    About the archive rebuild: The build was made on virtual machines from AWS, using sbuild and a reduced chroot with only build-essential packages.

    If you could not reproduce the bug please contact me privately, as I
    am willing to provide ssh access to a virtual machine where the bug is
    fully reproducible.

    If this is really a bug in one of the build-depends, please use
    reassign and add an affects on src:python-xarray, so that this is still
    visible in the BTS web page for this package.

    Thanks.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From picca@21:1/5 to All on Sun Mar 23 07:30:01 2025
    With the upload of the new zarr, the errors are now

    =========================== short test summary info ============================
    FAILED xarray/tests/test_groupby.py::test_dask_da_groupby_quantile - Failed: ...
    FAILED xarray/tests/test_weighted.py::test_weighted_operations_keep_attr[False-True-std]
    FAILED xarray/tests/test_weighted.py::test_weighted_operations_keep_attr[False-False-std]
    FAILED xarray/tests/test_weighted.py::test_weighted_operations_keep_attr[None-True-std]
    FAILED xarray/tests/test_weighted.py::test_weighted_operations_keep_attr[None-False-std]
    FAILED xarray/tests/test_weighted.py::test_weighted_operations_keep_attr_da_in_ds[std]
    = 6 failed, 16792 passed, 1293 skipped, 71 xfailed, 109 xpassed, 2221
    warnings in 341.36s (0:05:41) =

    Cheers

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Debian Bug Tracking System@21:1/5 to All on Mon Mar 24 06:40:01 2025
    This is a multi-part message in MIME format...

    Your message dated Mon, 24 Mar 2025 05:35:42 +0000
    with message-id <E1twaTO-00Dio4-HV@fasolo.debian.org>
    and subject line Bug#1100293: fixed in python-xarray 2025.01.2-2
    has caused the Debian Bug report #1100293,
    regarding python-xarray: FTBFS: E RuntimeWarning: invalid value encountered in sqrt
    to be marked as done.

    This means that you claim that the problem has been dealt with.
    If this is not the case it is now your responsibility to reopen the
    Bug report if necessary, and/or fix the problem forthwith.

    (NB: If you are a system administrator and have no idea what this
    message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org
    immediately.)


    --
    1100293: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1100293
    Debian Bug Tracking System
    Contact owner@bugs.debian.org with problems

    Received: (at submit) by bugs.debian.org; 12 Mar 2025 16:33:34 +0000 X-Spam-Checker-Version: SpamAssassin 3.4.6-bugs.debian.org_2005_01_02
    (2021-04-09) on buxtehude.debian.org
    X-Spam-Level:
    X-Spam-Status: No, score=-121.0 required=4.0 tests=ALL_TRUSTED,BAYES_00,
    BODY_INCLUDES_PACKAGE,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,
    DKIM_VALID_AU,DKIM_VALID_EF,FROMDEVELOPER,HAS_PACKAGE,
    PP_MIME_FAKE_ASCII_TEXT,SPF_HELO_PASS,SPF_NONE,
    USER_IN_DKIM_WELCOMELIST,USER_IN_DKIM_WHITELIST,X_DEBBUGS_CC
    autolearn=ham autolearn_force=no
    version=3.4.6-bugs.debian.org_2005_01_02
    X-Spam-Bayes: score:0.0000 Tokens: new, 195; hammy, 150; neutral, 651; spammy,
    0. spammytokens: hammytokens:0.000-+--python3, 0.000-+--trixie,
    0.000-+--pkgbuilddir, 0.000-+--PKGBUILDDIR, 0.000-+--H*F:U*sanvila Return-path: <sanvila@debian.org>
    Received: from mailly.debian.org ([2001:41b8:2