-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Description
Describe the bug
Matplotlib 3.6 deprecated the event functions on the canvas. This causes some number of tests that use fake events to fail.
Steps to reproduce
- Install
mne
dependencies - Update matplotlib to 3.6.0rc1
- Run
pytest
Expected results
Tests pass.
Actual results
See build log against Matplotlib 3.6
______________________ test_plot_epochs_basic[matplotlib] ______________________
mne/viz/tests/test_epochs.py:62: in test_plot_epochs_basic
fig._fake_keypress('escape')
mne/viz/_mpl_figure.py:1964: in _fake_keypress
fig.canvas.key_press_event(key)
/usr/lib64/python3.11/site-packages/matplotlib/_api/deprecation.py:199: in wrapper
emit_warning()
/usr/lib64/python3.11/site-packages/matplotlib/_api/deprecation.py:193: in emit_warning
warn_deprecated(
/usr/lib64/python3.11/site-packages/matplotlib/_api/deprecation.py:96: in warn_deprecated
warn_external(warning, category=MatplotlibDeprecationWarning)
/usr/lib64/python3.11/site-packages/matplotlib/_api/__init__.py:363: in warn_external
warnings.warn(message, category, stacklevel)
E matplotlib._api.deprecation.MatplotlibDeprecationWarning: The key_press_event function was deprecated in Matplotlib 3.6 and will be removed two minor releases later. Use callbacks.process('key_press_event', KeyEvent(...)) instead.
and similar for button_press_event
, resize_event
Additional information
Sorry, don't have this in a non-interactive package build, but you can check the top of the above-linked file for installed dependencies.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done