Bug#1084228: FTBFS: Test failure: test_array_inference[data7-expected7]: AssertionError: DatetimeArray._ndarray are different

Stefano Rivera stefanor at debian.org
Sun Oct 6 22:44:06 BST 2024


Source: pandas
Version: 2.2.3+dfsg-1
Severity: serious
Tags: ftbfs
Justification: FTBFS

Dear maintainer,

During a test rebuild, pandas failed to rebuild.

-------------------------------------------------------------------------------
[...]
============================= test session starts ==============================
platform linux -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0
PyQt5 5.15.11 -- Qt runtime 5.15.13 -- Qt compiled 5.15.13
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build
configfile: pyproject.toml
plugins: qt-4.3.1, localserver-0.0.0, xdist-3.6.1, typeguard-4.3.0, hypothesis-6.112.1, asyncio-0.24.0a1, forked-1.6.0
asyncio: mode=Mode.STRICT, default_loop_scope=None
collected 19229 items / 2 skipped

pandas/tests/arrays/boolean/test_arithmetic.py .....................
pandas/tests/arrays/boolean/test_astype.py ...
pandas/tests/arrays/boolean/test_comparison.py ....................................
pandas/tests/arrays/boolean/test_construction.py .............................
pandas/tests/arrays/boolean/test_function.py ...........
pandas/tests/arrays/boolean/test_indexing.py ...
pandas/tests/arrays/boolean/test_logical.py ...................................................................................
pandas/tests/arrays/boolean/test_ops.py ..
pandas/tests/arrays/boolean/test_reduction.py ..............................
pandas/tests/arrays/boolean/test_repr.py .
pandas/tests/arrays/categorical/test_algos.py ..............
pandas/tests/arrays/categorical/test_analytics.py ........x..x................................................
pandas/tests/arrays/categorical/test_api.py .................................................................
pandas/tests/arrays/categorical/test_astype.py ......................
pandas/tests/arrays/categorical/test_constructors.py .......................................................................................................................
pandas/tests/arrays/categorical/test_dtypes.py ..................................
pandas/tests/arrays/categorical/test_indexing.py ...............................................................................................................................................
pandas/tests/arrays/categorical/test_map.py .............................
pandas/tests/arrays/categorical/test_missing.py ..........................
pandas/tests/arrays/categorical/test_operators.py ......................................
pandas/tests/arrays/categorical/test_replace.py ......................
pandas/tests/arrays/categorical/test_repr.py .......................
pandas/tests/arrays/categorical/test_sorting.py ....
pandas/tests/arrays/categorical/test_subclass.py ...
pandas/tests/arrays/categorical/test_take.py ................
pandas/tests/arrays/categorical/test_warnings.py s
pandas/tests/arrays/datetimes/test_constructors.py ......................ssssssssssssss
pandas/tests/arrays/datetimes/test_cumulative.py ...
pandas/tests/arrays/datetimes/test_reductions.py .................................................................................................................................................................................................................
pandas/tests/arrays/floating/test_arithmetic.py ..............................................................
pandas/tests/arrays/floating/test_astype.py .........
pandas/tests/arrays/floating/test_comparison.py ..................................................................................................................
pandas/tests/arrays/floating/test_concat.py ...
pandas/tests/arrays/floating/test_construction.py ...............................
pandas/tests/arrays/floating/test_contains.py .
pandas/tests/arrays/floating/test_function.py ....................................................
pandas/tests/arrays/floating/test_repr.py ........
pandas/tests/arrays/floating/test_to_numpy.py ..............................
pandas/tests/arrays/integer/test_arithmetic.py ...................................................................................................................................................................................................................................................................................................................................................
pandas/tests/arrays/integer/test_comparison.py .........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
pandas/tests/arrays/integer/test_concat.py ..................
pandas/tests/arrays/integer/test_construction.py ...............................................
pandas/tests/arrays/integer/test_dtypes.py .........................................................................................................................
pandas/tests/arrays/integer/test_function.py .............................................................................................................................
pandas/tests/arrays/integer/test_indexing.py ..
pandas/tests/arrays/integer/test_reduction.py ...............................................
pandas/tests/arrays/integer/test_repr.py ..........................
pandas/tests/arrays/interval/test_astype.py ..
pandas/tests/arrays/interval/test_formats.py .
pandas/tests/arrays/interval/test_interval.py ..............................................................................
pandas/tests/arrays/interval/test_interval_pyarrow.py ssssssss
pandas/tests/arrays/interval/test_overlaps.py ....................................................................................................................
pandas/tests/arrays/masked/test_arithmetic.py ..............................................................................................................................................ss........................................................................................................................................................ss........................................................................................................................................................ss........................................................................................................................................................ss........................................................................................................................................................ss...............................................................................................................................................................................................................................................................................................................................................................
pandas/tests/arrays/masked/test_function.py .....................
pandas/tests/arrays/masked/test_indexing.py ...........................................................................................................
pandas/tests/arrays/numpy_/test_indexing.py .......................................
pandas/tests/arrays/numpy_/test_numpy.py .......................................................................................
pandas/tests/arrays/period/test_astype.py ..........
pandas/tests/arrays/period/test_constructors.py .....................
pandas/tests/arrays/period/test_reductions.py ...
pandas/tests/arrays/sparse/test_accessor.py .............................................
pandas/tests/arrays/sparse/test_arithmetics.py ......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
pandas/tests/arrays/sparse/test_array.py ...........................................................................
pandas/tests/arrays/sparse/test_astype.py ........................
pandas/tests/arrays/sparse/test_combine_concat.py ..........
pandas/tests/arrays/sparse/test_constructors.py .................................
pandas/tests/arrays/sparse/test_dtype.py ........................................................
pandas/tests/arrays/sparse/test_indexing.py ................................................................................
pandas/tests/arrays/sparse/test_libsparse.py .....................................................................................
pandas/tests/arrays/sparse/test_reductions.py .......................................................................
pandas/tests/arrays/sparse/test_unary.py .........
pandas/tests/arrays/string_/test_string.py .ss.ss.ss.ss.ss.ss.ss.ss.ss.ssxssxss.ss.ss.ss.ss.ss.ss.ss.ss.ss.ss.ss.ss.ss.ss.ss.ss.ss.ss.ss.ss.ss.ss.ss.ss.ss.......ssss.ss.ss.ss.ss.ss.ss.ssxxssssxxssss....ssssssss....ssssssss.sssssssssssssssssssssss.ss.ss..ssss.ss...ssssss.ss.ss.ss.ss.ss.ss.ss.ss.ss.ss.ss
pandas/tests/arrays/string_/test_string_arrow.py s.ss.ssssssssss.ssssssssssssssssssssssssssssssssss
pandas/tests/arrays/test_array.py ....................................................F.................................
pandas/tests/arrays/test_datetimelike.py ........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ssssss....................................................................................................................................................................................................ssssssssssssssssssssssssssssssssssss..........................................................................................................................................................................................................................................................................................................................................
pandas/tests/arrays/test_datetimes.py ........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
pandas/tests/arrays/test_ndarray_backed.py .....
pandas/tests/arrays/test_period.py ...................
pandas/tests/arrays/test_timedeltas.py ......................................................................................................................................................
pandas/tests/arrays/timedeltas/test_constructors.py ........
pandas/tests/arrays/timedeltas/test_cumulative.py .....
pandas/tests/arrays/timedeltas/test_reductions.py ..........................

=================================== FAILURES ===================================
____________________ test_array_inference[data7-expected7] _____________________

data = [datetime.datetime(2000, 1, 1, 0, 0, tzinfo=<DstTzInfo 'CET' LMT+0:18:00 STD>), datetime.datetime(2001, 1, 1, 0, 0, tzinfo=<DstTzInfo 'CET' LMT+0:18:00 STD>)]
expected = <DatetimeArray>
['2000-01-01 00:00:00+01:00', '2001-01-01 00:00:00+01:00']
Length: 2, dtype: datetime64[ns, CET]

    @pytest.mark.parametrize(
        "data, expected",
        [
            # period
            (
                [pd.Period("2000", "D"), pd.Period("2001", "D")],
                period_array(["2000", "2001"], freq="D"),
            ),
            # interval
            ([pd.Interval(0, 1), pd.Interval(1, 2)], IntervalArray.from_breaks([0, 1, 2])),
            # datetime
            (
                [pd.Timestamp("2000"), pd.Timestamp("2001")],
                DatetimeArray._from_sequence(["2000", "2001"], dtype="M8[ns]"),
            ),
            (
                [datetime.datetime(2000, 1, 1), datetime.datetime(2001, 1, 1)],
                DatetimeArray._from_sequence(["2000", "2001"], dtype="M8[ns]"),
            ),
            (
                np.array([1, 2], dtype="M8[ns]"),
                DatetimeArray._from_sequence(np.array([1, 2], dtype="M8[ns]")),
            ),
            (
                np.array([1, 2], dtype="M8[us]"),
                DatetimeArray._simple_new(
                    np.array([1, 2], dtype="M8[us]"), dtype=np.dtype("M8[us]")
                ),
            ),
            # datetimetz
            (
                [pd.Timestamp("2000", tz="CET"), pd.Timestamp("2001", tz="CET")],
                DatetimeArray._from_sequence(
                    ["2000", "2001"], dtype=pd.DatetimeTZDtype(tz="CET", unit="ns")
                ),
            ),
            (
                [
                    datetime.datetime(2000, 1, 1, tzinfo=cet),
                    datetime.datetime(2001, 1, 1, tzinfo=cet),
                ],
                DatetimeArray._from_sequence(
                    ["2000", "2001"], dtype=pd.DatetimeTZDtype(tz=cet, unit="ns")
                ),
            ),
            # timedelta
            (
                [pd.Timedelta("1h"), pd.Timedelta("2h")],
                TimedeltaArray._from_sequence(["1h", "2h"], dtype="m8[ns]"),
            ),
            (
                np.array([1, 2], dtype="m8[ns]"),
                TimedeltaArray._from_sequence(np.array([1, 2], dtype="m8[ns]")),
            ),
            (
                np.array([1, 2], dtype="m8[us]"),
                TimedeltaArray._from_sequence(np.array([1, 2], dtype="m8[us]")),
            ),
            # integer
            ([1, 2], IntegerArray._from_sequence([1, 2], dtype="Int64")),
            ([1, None], IntegerArray._from_sequence([1, None], dtype="Int64")),
            ([1, pd.NA], IntegerArray._from_sequence([1, pd.NA], dtype="Int64")),
            ([1, np.nan], IntegerArray._from_sequence([1, np.nan], dtype="Int64")),
            # float
            ([0.1, 0.2], FloatingArray._from_sequence([0.1, 0.2], dtype="Float64")),
            ([0.1, None], FloatingArray._from_sequence([0.1, pd.NA], dtype="Float64")),
            ([0.1, np.nan], FloatingArray._from_sequence([0.1, pd.NA], dtype="Float64")),
            ([0.1, pd.NA], FloatingArray._from_sequence([0.1, pd.NA], dtype="Float64")),
            # integer-like float
            ([1.0, 2.0], FloatingArray._from_sequence([1.0, 2.0], dtype="Float64")),
            ([1.0, None], FloatingArray._from_sequence([1.0, pd.NA], dtype="Float64")),
            ([1.0, np.nan], FloatingArray._from_sequence([1.0, pd.NA], dtype="Float64")),
            ([1.0, pd.NA], FloatingArray._from_sequence([1.0, pd.NA], dtype="Float64")),
            # mixed-integer-float
            ([1, 2.0], FloatingArray._from_sequence([1.0, 2.0], dtype="Float64")),
            (
                [1, np.nan, 2.0],
                FloatingArray._from_sequence([1.0, None, 2.0], dtype="Float64"),
            ),
            # string
            (
                ["a", "b"],
                pd.StringDtype()
                .construct_array_type()
                ._from_sequence(["a", "b"], dtype=pd.StringDtype()),
            ),
            (
                ["a", None],
                pd.StringDtype()
                .construct_array_type()
                ._from_sequence(["a", None], dtype=pd.StringDtype()),
            ),
            # Boolean
            ([True, False], BooleanArray._from_sequence([True, False], dtype="boolean")),
            ([True, None], BooleanArray._from_sequence([True, None], dtype="boolean")),
        ],
    )
    def test_array_inference(data, expected):
        result = pd.array(data)
>       tm.assert_equal(result, expected)

pandas/tests/arrays/test_array.py:377: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

left = array(['1999-12-31T23:42:00.000000000', '2000-12-31T23:42:00.000000000'],
      dtype='datetime64[ns]')
right = array(['1999-12-31T23:00:00.000000000', '2000-12-31T23:00:00.000000000'],
      dtype='datetime64[ns]')
err_msg = None

    def _raise(left, right, err_msg) -> NoReturn:
        if err_msg is None:
            if left.shape != right.shape:
                raise_assert_detail(
                    obj, f"{obj} shapes are different", left.shape, right.shape
                )
    
            diff = 0
            for left_arr, right_arr in zip(left, right):
                # count up differences
                if not array_equivalent(left_arr, right_arr, strict_nan=strict_nan):
                    diff += 1
    
            diff = diff * 100.0 / left.size
            msg = f"{obj} values are different ({np.round(diff, 5)} %)"
>           raise_assert_detail(obj, msg, left, right, index_values=index_values)
E           AssertionError: DatetimeArray._ndarray are different
E           
E           DatetimeArray._ndarray values are different (100.0 %)
E           [left]:  [1999-12-31T23:42:00.000000000, 2000-12-31T23:42:00.000000000]
E           [right]: [1999-12-31T23:00:00.000000000, 2000-12-31T23:00:00.000000000]

pandas/_testing/asserters.py:684: AssertionError
- generated xml file: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/test-data.xml -
============================= slowest 30 durations =============================
0.27s setup    pandas/tests/arrays/test_datetimelike.py::TestDatetimeArray::test_bool_properties['UTC'-ME-is_month_end]
0.19s call     pandas/tests/arrays/test_datetimelike.py::TestDatetimeArray::test_compare_categorical_dtype[False-datetime.timezone(datetime.timedelta(days=-1, seconds=82800), 'foo')-B-False-False]
0.18s setup    pandas/tests/arrays/sparse/test_constructors.py::TestConstructors::test_from_spmatrix[0-coo]
0.13s teardown pandas/tests/arrays/timedeltas/test_reductions.py::TestReductions::test_mean_2d
0.12s setup    pandas/tests/arrays/floating/test_construction.py::test_to_array
0.06s call     pandas/tests/arrays/sparse/test_accessor.py::TestSeriesAccessor::test_from_coo
0.04s call     pandas/tests/arrays/categorical/test_dtypes.py::TestCategoricalDtypes::test_codes_dtypes
0.02s call     pandas/tests/arrays/integer/test_arithmetic.py::test_values_multiplying_large_series_by_NA
0.02s call     pandas/tests/arrays/sparse/test_arithmetics.py::TestSparseArrayArithmetics::test_mixed_array_comparison[integer]
0.02s call     pandas/tests/arrays/sparse/test_arithmetics.py::TestSparseArrayArithmetics::test_mixed_array_comparison[block]
0.02s call     pandas/tests/arrays/sparse/test_arithmetics.py::TestSparseArrayArithmetics::test_float_scalar_comparison[block]
0.02s call     pandas/tests/arrays/sparse/test_arithmetics.py::TestSparseArrayArithmetics::test_int_array_comparison[integer]
0.02s call     pandas/tests/arrays/sparse/test_arithmetics.py::TestSparseArrayArithmetics::test_float_array_comparison[integer]
0.02s call     pandas/tests/arrays/sparse/test_arithmetics.py::TestSparseArrayArithmetics::test_int_array_comparison[block]
0.01s call     pandas/tests/arrays/sparse/test_arithmetics.py::TestSparseArrayArithmetics::test_float_array_comparison[block]
0.01s call     pandas/tests/arrays/sparse/test_arithmetics.py::TestSparseArrayArithmetics::test_float_scalar_comparison[integer]
0.01s call     pandas/tests/arrays/categorical/test_api.py::TestCategoricalAPIWithFactor::test_describe
0.01s call     pandas/tests/arrays/test_period.py::test_repr_large
0.01s call     pandas/tests/arrays/sparse/test_accessor.py::TestFrameAccessor::test_from_spmatrix[float64-None-csc]
0.01s call     pandas/tests/arrays/sparse/test_accessor.py::TestFrameAccessor::test_from_spmatrix[float64-labels1-coo]
0.01s call     pandas/tests/arrays/sparse/test_accessor.py::TestFrameAccessor::test_from_spmatrix[float64-labels1-csr]
0.01s call     pandas/tests/arrays/sparse/test_accessor.py::TestFrameAccessor::test_from_spmatrix[float64-None-csr]
0.01s call     pandas/tests/arrays/sparse/test_accessor.py::TestFrameAccessor::test_from_spmatrix[float64-labels1-csc]
0.01s call     pandas/tests/arrays/sparse/test_accessor.py::TestFrameAccessor::test_from_spmatrix[float64-None-coo]
0.01s call     pandas/tests/arrays/sparse/test_accessor.py::TestFrameAccessor::test_from_spmatrix[int64-labels1-csr]
0.01s call     pandas/tests/arrays/sparse/test_accessor.py::TestFrameAccessor::test_from_spmatrix[int64-labels1-coo]
0.01s call     pandas/tests/arrays/sparse/test_accessor.py::TestFrameAccessor::test_from_spmatrix[int64-None-csr]
0.01s call     pandas/tests/arrays/sparse/test_accessor.py::TestFrameAccessor::test_from_spmatrix[int64-labels1-csc]
0.01s call     pandas/tests/arrays/sparse/test_accessor.py::TestFrameAccessor::test_from_spmatrix[int64-None-coo]
0.01s call     pandas/tests/arrays/sparse/test_accessor.py::TestFrameAccessor::test_from_spmatrix[int64-None-csc]
=========================== short test summary info ============================
FAILED pandas/tests/arrays/test_array.py::test_array_inference[data7-expected7]
========== 1 failed, 18201 passed, 1021 skipped, 8 xfailed in 37.78s ===========
-------------------------------------------------------------------------------

The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here (for the next 30 days):
https://debusine.debian.net/artifact/834441/

About the archive rebuild: The build was made on debusine.debian.net,
on arm64 using sbuild.

You can find the build task here:
https://debusine.debian.net/work-request/40773/

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

Thanks,

Stefano



More information about the debian-science-maintainers mailing list