BUG: add 'import warnings' statement in panel.py (GH8152)

closes #8152.
pls add the issue number as a comment here