Source: pandas Version: 2.1.4+dfsg-6 Severity: serious Tags: ftbfs patch Hi Maintainer
pandas FTBFS on 32-bit architectures with -D_TIME_BITS=64 (e.g. armel and armhf), due to tests expected to fail, now passing. I've copied what I hope are the relevant parts of the log below. The following is my first attempt at a patch, which would pass on armel and armhf, but fail on i386 and hurd-i386, which are not built with -D_TIME_BITS=64. --- a/pandas/tests/indexes/datetimes/test_ops.py +++ b/pandas/tests/indexes/datetimes/test_ops.py @@ -33,7 +33,7 @@ ) def test_resolution(self, request, tz_naive_fixture, freq, expected): tz = tz_naive_fixture - if freq == "A" and not IS64 and isinstance(tz, tzlocal): + if freq == "A" and isinstance(tz, tzlocal): request.node.add_marker( pytest.mark.xfail(reason="OverflowError inside tzlocal past 2038") ) --- a/pandas/tests/tseries/offsets/test_common.py +++ b/pandas/tests/tseries/offsets/test_common.py @@ -139,7 +139,7 @@ if tz is not None: assert t.tzinfo is not None - if isinstance(tz, tzlocal) and not IS64 and _offset is not DateOffset: + if isinstance(tz, tzlocal) and _offset is not DateOffset: # If we hit OutOfBoundsDatetime on non-64 bit machines # we'll drop out of the try clause before the next test request.node.add_marker( The following is my second attempt at a patch, which does not fail if the expected test failures succeed. --- a/pandas/tests/indexes/datetimes/test_ops.py +++ b/pandas/tests/indexes/datetimes/test_ops.py @@ -35,7 +35,7 @@ tz = tz_naive_fixture if freq == "A" and not IS64 and isinstance(tz, tzlocal): request.node.add_marker( - pytest.mark.xfail(reason="OverflowError inside tzlocal past 2038") + pytest.mark.xfail(reason="OverflowError inside tzlocal past 2038",strict=False) ) idx = date_range(start="2013-04-01", periods=30, freq=freq, tz=tz) --- a/pandas/tests/tseries/offsets/test_common.py +++ b/pandas/tests/tseries/offsets/test_common.py @@ -143,7 +143,7 @@ # If we hit OutOfBoundsDatetime on non-64 bit machines # we'll drop out of the try clause before the next test request.node.add_marker( - pytest.mark.xfail(reason="OverflowError inside tzlocal past 2038") + pytest.mark.xfail(reason="OverflowError inside tzlocal past 2038", strict=False) ) elif ( isinstance(tz, tzlocal) Regards Graham [1] https://buildd.debian.org/status/logs.php?pkg=pandas&arch=armhf [2] https://buildd.debian.org/status/logs.php?pkg=pandas&arch=armel =========================== short test summary info ============================ FAILED pandas/tests/indexes/datetimes/test_ops.py::TestDatetimeIndexOps::test_resolution[tzlocal()-A-day] = 1 failed, 15623 passed, 383 skipped, 5 deselected, 46 xfailed, 4 xpassed in 47.98s = rdjoqkol test state = false =========================== short test summary info ============================ FAILED pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BusinessDay] FAILED pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BusinessHour] FAILED pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BusinessMonthEnd] FAILED pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BusinessMonthBegin] FAILED pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BQuarterEnd] FAILED pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BQuarterBegin] FAILED pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-CustomBusinessDay] FAILED pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-CustomBusinessHour] FAILED pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-CustomBusinessMonthEnd] FAILED pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-CustomBusinessMonthBegin] FAILED pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-MonthEnd] FAILED pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-MonthBegin] FAILED pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-SemiMonthBegin] FAILED pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-SemiMonthEnd] FAILED pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-QuarterEnd] FAILED pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-LastWeekOfMonth] FAILED pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-WeekOfMonth] FAILED pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-Week] ============ 18 failed, 5294 passed, 2 xfailed, 1 warning in 16.17s ============ rdjoqkol test state = false