From 7a63f77f9fceace0855521ba83f46d56cb04a3be Mon Sep 17 00:00:00 2001 From: Jean-Christophe Jaskula <99367153+jcjaskula-aws@users.noreply.github.com> Date: Sun, 15 Sep 2024 15:46:22 -0400 Subject: [PATCH] do not use matplotlib deprecated functions --- pydev_ipython/matplotlibtools.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pydev_ipython/matplotlibtools.py b/pydev_ipython/matplotlibtools.py index 2fbfb992..2b4c954d 100644 --- a/pydev_ipython/matplotlibtools.py +++ b/pydev_ipython/matplotlibtools.py @@ -55,11 +55,11 @@ def find_gui_and_backend(): def is_interactive_backend(backend): """Check if backend is interactive""" matplotlib = sys.modules["matplotlib"] - from matplotlib.rcsetup import interactive_bk, non_interactive_bk # @UnresolvedImport + from matplotlib.backends import BackendFilter, backend_registry # @UnresolvedImport - if backend in interactive_bk: + if backend in backend_registry.list_builtin(BackendFilter.INTERACTIVE): return True - elif backend in non_interactive_bk: + elif backend in backend_registry.list_builtin(BackendFilter.NON_INTERACTIVE): return False else: return matplotlib.is_interactive()