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

[BUG] is_datetime_or_timedelta removed in Pandas 2.1.0 #263

Closed
dtaivpp opened this issue Aug 30, 2023 · 8 comments
Closed

[BUG] is_datetime_or_timedelta removed in Pandas 2.1.0 #263

dtaivpp opened this issue Aug 30, 2023 · 8 comments
Labels
bug Something isn't working CCI

Comments

@dtaivpp
Copy link
Contributor

dtaivpp commented Aug 30, 2023

What is the bug?
We import is_datetime_or_timedelta in field_mappings.py but that has been removed from Pandas version 2.1.0.

How can one reproduce the bug?

  1. pip install pandas==2.1.0
  2. from opensearch_py_ml.ml_commons import MLCommonClient
  3. run the file

What is the expected behavior?
Should not give import error.

What is your host/environment?
N/A

Do you have any screenshots?
If applicable, add screenshots to help explain your problem.

Do you have any additional context?
Add any other context about the problem.

@dtaivpp dtaivpp added bug Something isn't working untriaged labels Aug 30, 2023
@dhrubo-os dhrubo-os added CCI and removed untriaged labels Aug 31, 2023
@bsowell
Copy link

bsowell commented Sep 18, 2023

I was bit by this one recently. @dtaivpp @dhrubo-os I'm not familiar with the CCI label -- is this one somebody is working on, or would you take a PR?

@dhrubo-os
Copy link
Collaborator

dhrubo-os commented Sep 18, 2023

I was bit by this one recently. @dtaivpp @dhrubo-os I'm not familiar with the CCI label -- is this one somebody is working on, or would you take a PR?

Currently nobody is working on this issue. I marked this as CCI so that our next college contributors can work on this issue. PRs are welcome.

@bsowell
Copy link

bsowell commented Sep 18, 2023

Got it. Thanks! Let me look into it and see if I can contribute something.

@rawwar
Copy link
Contributor

rawwar commented Oct 6, 2023

I see that a quick fix for this is to limit the version of pandas to < 2.0 .

@dhrubo-os
Copy link
Collaborator

I see that a quick fix for this is to limit the version of pandas to < 2.0 .

Yeah, we can just do: pandas>=1.5.2,<2.0 for a quick fix.

@bsowell are you working on this issue? Just checking.

@bsowell
Copy link

bsowell commented Oct 6, 2023

I'm sorry. I had trouble getting tests to run locally and then got distracted so I haven't done much. The implementation of is_datetime_or_timedelta_dtype is straightforward, so if there is value in upgrading pandas, it would be easy enough to just include the logic in field_mappings.py, but agree that the dependency change would be faster.

@Yerzhaisang
Copy link
Contributor

I think we should close this issue. is_datetime_or_timedelta is not used anymore

@dhrubo-os
Copy link
Collaborator

Closing this issue in favor of #316

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CCI
Projects
None yet
Development

No branches or pull requests

5 participants