From 147ff75cd82fcca85e816809319448c8d58d2e56 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Thu, 28 Feb 2019 21:48:02 -0500 Subject: [PATCH] Backport PR #11241: Deprecate the MATPLOTLIBDATA environment variable. --- doc/api/next_api_changes/2018-08-17-AL-deprecations.rst | 3 +++ lib/matplotlib/__init__.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/doc/api/next_api_changes/2018-08-17-AL-deprecations.rst b/doc/api/next_api_changes/2018-08-17-AL-deprecations.rst index 6e950c1b3649..a941f95ff802 100644 --- a/doc/api/next_api_changes/2018-08-17-AL-deprecations.rst +++ b/doc/api/next_api_changes/2018-08-17-AL-deprecations.rst @@ -12,3 +12,6 @@ The following API elements are deprecated: - ``cbook.get_label``, ``cbook.iterable``, - ``font_manager.OSXInstalledFonts``, - ``mlab.demean``, + +The following environment variables are deprecated: +- ``MATPLOTLIBDATA``, diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py index 447e52277c5d..489756d9f57a 100644 --- a/lib/matplotlib/__init__.py +++ b/lib/matplotlib/__init__.py @@ -606,6 +606,8 @@ def _get_data_path(): if not os.path.isdir(path): raise RuntimeError('Path in environment MATPLOTLIBDATA not a ' 'directory') + cbook.warn_deprecated( + "3.1", name="MATPLOTLIBDATA", obj_type="environment variable") return path def get_candidate_paths():