WARN : extended stack level check to include all classes of warnings 
- [x] closes #47919 
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).


closing for now as I think this might have been opened in error, but thanks anyway for your PR