diff --git a/doc/api/next_api_changes/2018-06-27-AL.rst b/doc/api/next_api_changes/2018-06-27-AL.rst index 74c32d357386..51a8171bf02d 100644 --- a/doc/api/next_api_changes/2018-06-27-AL.rst +++ b/doc/api/next_api_changes/2018-06-27-AL.rst @@ -4,3 +4,10 @@ Changes to backend loading Failure to load backend modules (``macosx`` on non-framework builds and ``gtk3`` when running headless) now raises `ImportError` (instead of `RuntimeError` and `TypeError`, respectively. + +Third-party backends that integrate with an interactive framework are now +encouraged to define the ``required_interactive_framework`` global value to one +of the following values: "qt5", "qt4", "gtk3", "wx", "tk", or "macosx". This +information will be used to determine whether it is possible to switch from a +backend to another (specifically, whether they use the same interactive +framework). diff --git a/lib/matplotlib/backends/__init__.py b/lib/matplotlib/backends/__init__.py index e506d3100927..2467a4235373 100644 --- a/lib/matplotlib/backends/__init__.py +++ b/lib/matplotlib/backends/__init__.py @@ -1,5 +1,7 @@ import importlib import logging +import os +import sys import traceback import matplotlib @@ -14,6 +16,54 @@ if not line.startswith(' File "