xarray: bad conda solve with pandas 2

What happened?

Pandas 2 is out.

We have a pandas<2 pin for our latest release, but mamba is now returning xarray=2023.1.0 and pandas=2.0 which is making cf-xarray and flox tests fail.

It looks like any project that tests resample without pinning pandas will fail.

I opened the issue here for visibility. It seems we might need a repodata patch to disallow pandas<2?

cc @ocefpaf

What did you expect to happen?

No response

Minimal Complete Verifiable Example

No response

MVCE confirmation

  • Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
  • Complete example — the example is self-contained, including all data and the text of any traceback.
  • Verifiable example — the example copy & pastes into an IPython prompt or Binder notebook, returning the result.
  • New issue — a search of GitHub Issues suggests this is not a duplicate.

Relevant log output

No response

Anything else we need to know?

No response

Environment

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 18 (12 by maintainers)

Most upvoted comments

CI says these are the tests we’d need to fix:

Chiming in from the pandas side on those failures, I think they are all expected https://pandas.pydata.org/docs/whatsnew/v2.0.0.html namely

  • Since pandas supports s, ms and us numpy datetime resolutions now, I’m guessing that’s why test_to_datetimeindex_out_of_range and test_should_cftime_be_used_source_outside_range are failing
  • For test_sel_float, pd.Index intentionally does not support np.float16 as dtype anymore (we never had an indexing engine for this dtype)
  • For test_maybe_coerce_to_str, this might be expected too as Index dtypes can hold np.int32 types now

We need to do a repodata patch for the current xarray. I’ll get to it soon.