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

Use DeprecationWarning instead of FutureWarning for is_.._dtype deprecations #55703

Merged
merged 5 commits into from Dec 7, 2023

Conversation

jorisvandenbossche
Copy link
Member

xref #54970

Those kind of helpers functions are, I think, for a large part used by other libraries, and to a lesser extent by direct user code. For that kind of deprecations, we first start with a DeprecationWarning, so it's not visible for the end-user (like users of seaborn got a flood of warnings before their latest release).

Of course, changing it now might also give some churn in case some other projects already added some code to suppress them, but I think it's still useful to do now (many people have not yet upgraded to 2.1).

@rhshadrach
Copy link
Member

Of course, changing it now might also give some churn in case some other projects already added some code to suppress them, but I think it's still useful to do now (many people have not yet upgraded to 2.1).

People may have not upgraded, but downstream packages? If a package is dependent on pandas I would imagine it is likely to become "2.1-compliant" faster than end users. Though hopefully packages are not handling warnings by suppressing them 😆 If they are though, and they are suppressing the FutureWarning, they will have to change it to a DeprecationWarning, then back to FutureWarning (assuming they haven't addressed it).

I'm on the fence here.

@jorisvandenbossche
Copy link
Member Author

People may have not upgraded, but downstream packages? If a package is dependent on pandas I would imagine it is likely to become "2.1-compliant" faster than end users.

Taking the example of seaborn, which is a well maintained package, that only had a release fixing this a few weeks after the pandas release. And I expect there to be many packages that are slower than the seaborn maintainer (note that it is not enough to fix this but also to release).

@jorisvandenbossche
Copy link
Member Author

And indeed, if they addressed the warning, they either fixed it (and this PR won't change anything for them), or either they suppressed it temporarily, and then they will see the warning again (requiring them to suppress it temporarily again, or prompt them to actually fix it)

@jorisvandenbossche jorisvandenbossche added this to the 2.1.3 milestone Oct 27, 2023
@rhshadrach
Copy link
Member

I'm good with changing to a DeprecationWarning, but would like to get thoughts from those who originally deprecated. cc @jbrockmendel @phofl @mroeschke

@jbrockmendel
Copy link
Member

fine by me

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

@jorisvandenbossche jorisvandenbossche modified the milestones: 2.1.3, 2.1.4 Nov 13, 2023
Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

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

LGTM. Merge when ready @rhshadrach

@rhshadrach rhshadrach merged commit d36fb98 into pandas-dev:main Dec 7, 2023
44 checks passed
@rhshadrach
Copy link
Member

Thanks @jorisvandenbossche

Copy link

lumberbot-app bot commented Dec 7, 2023

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 2.1.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 d36fb98ddba74631812f113050c0a6f945868051
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #55703: Use DeprecationWarning instead of FutureWarning for is_.._dtype deprecations'
  1. Push to a named branch:
git push YOURFORK 2.1.x:auto-backport-of-pr-55703-on-2.1.x
  1. Create a PR against branch 2.1.x, I would have named this PR:

"Backport PR #55703 on branch 2.1.x (Use DeprecationWarning instead of FutureWarning for is_.._dtype deprecations)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@jorisvandenbossche jorisvandenbossche deleted the dtype-deprs branch December 7, 2023 13:09
lithomas1 pushed a commit that referenced this pull request Dec 7, 2023
… FutureWarning for is_.._dtype deprecations) (#56377)

Use DeprecationWarning instead of FutureWarning for is_.._dtype deprecations (#55703)

(cherry picked from commit d36fb98)
galipremsagar added a commit to rapidsai/cudf that referenced this pull request Dec 18, 2023
…`FutureWarning` (#14617)

This PR changes all FutureWarning's to DeprecationWarning's to match with pandas: pandas-dev/pandas#55703

On pandas_2.0_feature_branch:

= 501 failed, 101106 passed, 2071 skipped, 786 xfailed, 312 xpassed, 20 errors in 1234.91s (0:20:34) =
This PR:

= 445 failed, 101162 passed, 2071 skipped, 786 xfailed, 312 xpassed, 20 errors in 1216.79s (0:20:16) =
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants