From 4b378f6be4fe7af213d7090de2419afdc2896120 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Sat, 8 Aug 2020 11:11:16 +0100 Subject: [PATCH 1/2] Remove mpl.testing deprecations for 3.4 --- lib/matplotlib/testing/__init__.py | 6 ------ lib/matplotlib/testing/jpl_units/UnitDbl.py | 16 ---------------- 2 files changed, 22 deletions(-) diff --git a/lib/matplotlib/testing/__init__.py b/lib/matplotlib/testing/__init__.py index 43f8b27ad4f9..9c9c728b7c14 100644 --- a/lib/matplotlib/testing/__init__.py +++ b/lib/matplotlib/testing/__init__.py @@ -11,12 +11,6 @@ _log = logging.getLogger(__name__) -@cbook.deprecated("3.2") -def is_called_from_pytest(): - """Whether we are in a pytest run.""" - return getattr(mpl, '_called_from_pytest', False) - - def set_font_settings_for_testing(): mpl.rcParams['font.family'] = 'DejaVu Sans' mpl.rcParams['text.hinting'] = 'none' diff --git a/lib/matplotlib/testing/jpl_units/UnitDbl.py b/lib/matplotlib/testing/jpl_units/UnitDbl.py index 645bc6f6600e..14d77cd8faf7 100644 --- a/lib/matplotlib/testing/jpl_units/UnitDbl.py +++ b/lib/matplotlib/testing/jpl_units/UnitDbl.py @@ -228,22 +228,6 @@ def range(start, stop, step=None): return elems - @cbook.deprecated("3.2") - def checkUnits(self, units): - """ - Check to see if some units are valid. - - = ERROR CONDITIONS - - If the input units are not in the allowed list, an error is thrown. - - = INPUT VARIABLES - - units The string name of the units to check. - """ - if units not in self.allowed: - raise ValueError("Input units '%s' are not one of the supported " - "types of %s" % ( - units, list(self.allowed.keys()))) - def checkSameUnits(self, rhs, func): """ Check to see if units are the same. From 9ad0acfa5ccdfd7981d64340e0f4f1418f51a998 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Sat, 8 Aug 2020 11:12:13 +0100 Subject: [PATCH 2/2] Add removal note --- doc/api/next_api_changes/removals/18202-DS.rst | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 doc/api/next_api_changes/removals/18202-DS.rst diff --git a/doc/api/next_api_changes/removals/18202-DS.rst b/doc/api/next_api_changes/removals/18202-DS.rst new file mode 100644 index 000000000000..840c28010bfe --- /dev/null +++ b/doc/api/next_api_changes/removals/18202-DS.rst @@ -0,0 +1,6 @@ +`matplotlib.testing` removals +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- ``testing.is_called_from_pytest`` has been removed. +- ``jpl_units.Unitdbl.checkUnits`` has been removed. Use + ``units not in self.allowed`` instead.