Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make kind argument in CFTimeIndex._maybe_cast_slice_bound optional #5359

Merged
merged 2 commits into from
May 23, 2021

Conversation

spencerkclark
Copy link
Member

@spencerkclark spencerkclark commented May 21, 2021

Pandas recently deprecated the kind argument in Index._maybe_cast_slice_bound, and removed its use in several internal calls: pandas-dev/pandas#41378. This led to some errors in the CFTimeIndex tests in our upstream build. We never made use of it in CFTimeIndex._maybe_cast_slice_bound so the simplest fix for backwards compatibility seems to be to make it optional for now -- in previous versions of pandas it was required -- and remove it when our minimum version of pandas is at least 1.3.0.

@pep8speaks
Copy link

pep8speaks commented May 21, 2021

Hello @spencerkclark! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-05-22 23:58:02 UTC

Copy link
Collaborator

@keewis keewis left a comment

Choose a reason for hiding this comment

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

thanks for the fix, @spencerkclark. The docs should be fixed by indenting the whats-new.rst entry.

doc/whats-new.rst Outdated Show resolved Hide resolved
Co-authored-by: keewis <keewis@users.noreply.github.com>
@keewis
Copy link
Collaborator

keewis commented May 23, 2021

thanks again, @spencerkclark.

@keewis keewis merged commit ca72d56 into pydata:master May 23, 2021
@spencerkclark spencerkclark deleted the remove-deprecated-kind-arg branch May 23, 2021 09:47
@TomNicholas TomNicholas mentioned this pull request Jul 8, 2021
8 tasks
@ellesmith88 ellesmith88 mentioned this pull request Sep 28, 2021
5 tasks
glemieux added a commit to glemieux/fates that referenced this pull request Apr 6, 2023
This incorporates an update to handle a pandas deprication issue when
using cftime objects.  See pydata/xarray#5359
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

⚠️ Nightly upstream-dev CI failed ⚠️
3 participants