Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MAINT update test since SettingWithCopyWarning location change #23658

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

Merged
merged 2 commits into from
Jun 20, 2022

Conversation

glemaitre
Copy link
Member

Related to #23626

SettingWithCopyWarning was moved from pandas.core.common to pandas.errors.
Since this is only in our test, I think that we can just fix our test without requesting a change in pandas.

if hasattr(pd.errors, "SettingWithCopyWarning"):
SettingWithCopyWarning = pd.errors.SettingWithCopyWarning
else:
SettingWithCopyWarning = pd.core.common.SettingWithCopyWarning
Copy link
Member

Choose a reason for hiding this comment

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

A comment with the pandas version would be nice here so that we know when we can remove it . This line is for pandas < 1.5 I think.

@lesteve
Copy link
Member

lesteve commented Jun 20, 2022

I pushed a commmit adding a commit with the pandas version, merging this one, thanks!

@lesteve lesteve merged commit 8a07dc2 into scikit-learn:main Jun 20, 2022
ogrisel pushed a commit to ogrisel/scikit-learn that referenced this pull request Jul 11, 2022
glemaitre added a commit to glemaitre/scikit-learn that referenced this pull request Aug 4, 2022
glemaitre added a commit that referenced this pull request Aug 5, 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.

2 participants