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