Skip to content

Re-enable xarray timedelta/datetime roundtrip tests on xarray >= 2026.7.0#2297

Merged
li-em merged 2 commits into
mainfrom
revert-2229-timedelta-skips
Jul 24, 2026
Merged

Re-enable xarray timedelta/datetime roundtrip tests on xarray >= 2026.7.0#2297
li-em merged 2 commits into
mainfrom
revert-2229-timedelta-skips

Conversation

@li-em

@li-em li-em commented Jul 24, 2026

Copy link
Copy Markdown
Member

#2229 skipped the xarray timedelta/datetime roundtrip tests because no released
xarray was compatible with numpy >= 2.5 time-coding (int64 * timedelta64
overflow, datetime decode failures, and a generic-unit timedelta
DeprecationWarning raised at import).

xarray 2026.7.0 ships the fix, so this re-enables the tests — but only where
the fix exists. Our minimum supported xarray (2025.07.1) still hits all of the
above when installed alongside current numpy, which is exactly what the
minimum-versions CI matrix does. A plain revert of #2229 therefore fails those
jobs (54 xarray-backends failures + 4 collection errors in test_dask.py).

Changes:

  • run_xarray_backends_tests.py: the three skip overrides
    (test_roundtrip_timedelta_data, test_roundtrip_timedelta_data_via_dtype,
    test_roundtrip_numpy_datetime_data) are now defined only when
    xarray < 2026.7.0. On newer xarray the upstream tests run for real.
  • pyproject.toml: the generic-timedelta DeprecationWarning filter stays
    (old xarray raises it on import under numpy >= 2.5); it's inert on newer
    xarray.

Both can be dropped once the minimum supported xarray reaches 2026.7.0.

Closes #2230

@codecov-commenter

codecov-commenter commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.70%. Comparing base (4615c81) to head (122f0dd).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2297   +/-   ##
=======================================
  Coverage   84.70%   84.70%           
=======================================
  Files          88       88           
  Lines       38995    38995           
=======================================
  Hits        33030    33030           
  Misses       5965     5965           
Flag Coverage Δ
python 90.06% <ø> (ø)
rust 84.10% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@li-em
li-em force-pushed the revert-2229-timedelta-skips branch from b8e80ad to 8a0b4f3 Compare July 24, 2026 20:37
@li-em
li-em enabled auto-merge July 24, 2026 20:40
@li-em li-em changed the title Revert temporary xarray timedelta test skips (#2229) Re-enable xarray timedelta/datetime roundtrip tests on xarray >= 2026.7.0 (#2229) Jul 24, 2026
@li-em li-em changed the title Re-enable xarray timedelta/datetime roundtrip tests on xarray >= 2026.7.0 (#2229) Re-enable xarray timedelta/datetime roundtrip tests on xarray >= 2026.7.0 Jul 24, 2026
li-em added 2 commits July 24, 2026 18:36
…#2229)"

xarray 2026.7.0 includes the numpy 2.5+ time-coding fix; the skipped
datetime/timedelta roundtrip tests pass again under nightly deps, and
the generic-unit timedelta DeprecationWarning no longer fires.

This reverts commit ed5a97c.

Closes #2230
@li-em
li-em force-pushed the revert-2229-timedelta-skips branch from 12991c4 to 122f0dd Compare July 24, 2026 21:36
@li-em
li-em added this pull request to the merge queue Jul 24, 2026
Merged via the queue into main with commit d6e27c5 Jul 24, 2026
32 of 33 checks passed
@li-em
li-em deleted the revert-2229-timedelta-skips branch July 24, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revert np.timedelta temporary fixes in #2229

3 participants