CLN: remove unused import of warnings module
I forgot to remove a import line in #24080 as the warning module is no longur used in ``frame_methods.py`` and we now get a linting error.

This PR fixes that.
