Skip to content

Conversation

@spencerkclark
Copy link
Member

@spencerkclark spencerkclark commented Dec 6, 2025

This PR addresses the pandas-related upstream errors surfaced in #10973. I broke down the commits according to which pandas PR the errors resulted from. Most of these changes are explicitly specifying nanosecond units in test setups where those units were implied before.

Some other updates on the pandas side that we had to adapt to are that datetime.timedelta objects are now converted to microsecond resolution np.datetime64 values instead of nanosecond resolution, and the "mode.copy_on_write" option is being deprecated and will always be set to True.

In the end, I think none of these changes were too concerning, and were in some ways helpful from a CFTimeIndex perspective.

Closes #10973

cc: @kmuehlbauer

ds2.plot.scatter(x="A", y="B", hue="hue")

ds2["hue"] = pd.timedelta_range("-1D", periods=4, freq="D")
ds2["hue"] = pd.timedelta_range("-1D", periods=4, freq="D", unit="ns") # type: ignore[call-arg,unused-ignore]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This type error has been fixed upstream, but we currently pin to an earlier version of pandas-stubs due to another issue: #10110.

@spencerkclark spencerkclark added the run-upstream Run upstream CI label Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-upstream Run upstream CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

⚠️ Nightly upstream-dev CI failed ⚠️

2 participants