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

Remove use of deprecated kind argument in CFTimeIndex tests #5723

Merged
merged 5 commits into from
Oct 24, 2021

Conversation

spencerkclark
Copy link
Member

@spencerkclark spencerkclark commented Aug 21, 2021

On the topic of FutureWarning's related to indexing in pandas (#5721), I noticed some another kind of warning in the CFTimeIndex tests:

/Users/spencer/software/xarray/xarray/tests/test_cftimeindex.py:350: FutureWarning: 'kind' argument in get_slice_bound is deprecated and will be removed in a future version.  Do not pass it.
    result = index.get_slice_bound("0001", "left", kind)

I think it's safe to silence these by removing the kind argument from these tests. We never used it anyway in CFTimeIndex. This is sort of a follow-up to #5359.

  • Passes pre-commit run --all-files
  • User visible changes (including notable bug fixes) are documented in whats-new.rst

@spencerkclark spencerkclark changed the title Remove use of deprecated kind argument in CFTimeIndex tests Remove use of deprecated kind argument in CFTimeIndex tests Aug 21, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Aug 21, 2021

Unit Test Results

         6 files           6 suites   54m 8s ⏱️
16 209 tests 14 488 ✔️ 1 721 💤 0
90 450 runs  82 285 ✔️ 8 165 💤 0

Results for commit a3cc075.

♻️ This comment has been updated with latest results.

@mathause
Copy link
Collaborator

mathause commented Sep 1, 2021

LGTM - I think the test failure does not come from here?

@spencerkclark
Copy link
Member Author

That's right. I now merged main so hopefully those test failures should clear up.

@spencerkclark
Copy link
Member Author

Oops I forgot about the minimum deps environment. Those failures are indeed real. I guess we could put some version-dependent logic in there.

@TomNicholas TomNicholas mentioned this pull request Oct 23, 2021
@spencerkclark
Copy link
Member Author

@mathause I think this should be ready now. I added some version-dependent logic to the tests.

@dcherian
Copy link
Contributor

Thanks @spencerkclark

@dcherian dcherian merged commit 69dec51 into pydata:main Oct 24, 2021
@spencerkclark spencerkclark deleted the get_slice_bound-kind branch October 24, 2021 11:37
dcherian added a commit to dcherian/xarray that referenced this pull request Oct 29, 2021
* upstream/main:
  Only run asv benchmark when labeled (pydata#5893)
  Add asv benchmark jobs to CI (pydata#5796)
  Remove use of deprecated `kind` argument in `CFTimeIndex` tests (pydata#5723)
  Single matplotlib import (pydata#5794)
  Check jupyter nbs with black in pre-commit (pydata#5891)
snowman2 pushed a commit to snowman2/xarray that referenced this pull request Feb 9, 2022
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.

3 participants