CI: catch warnings in ci
- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

let's backport this to get rid of the warnings on the 2.0.x branch as well
I think https://github.com/pandas-dev/pandas/pull/51312 should cover the changes here if it is backported (which it should IMO) Would you be ok with checking this stricter like on this branch? I think it would be good to have stricter warning checks for all the 2.x branches So this is good to merge? Oh, I had meant merging https://github.com/pandas-dev/pandas/pull/51312 will cover the warnings handled here and enable the warning checking to be stricter on the 2.x branch(es) Should I incorporate these changes in https://github.com/pandas-dev/pandas/pull/51312? Is that what you meant with these tests compared to my branch? Yeah exactly, I'd prefer if we check that a warning is raised instead of only filtering. Sorry for the confusion closing, will be fixed in the other pr