8000 Remove mpl.testing deprecations for 3.4 by dstansby · Pull Request #18202 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Remove mpl.testing deprecations for 3.4 #18202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
8000
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions doc/api/next_api_changes/removals/18202-DS.rst
Original file line number Diff line number Diff line change
@@ -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.
6 changes: 0 additions & 6 deletions lib/matplotlib/testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
16 changes: 0 additions & 16 deletions lib/matplotlib/testing/jpl_units/UnitDbl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
0