Remove remaining deprecations from 3.5 by QuLogic · Pull Request #24948 · matplotlib/matplotlib · GitHub
Skip to content
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
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions doc/api/next_api_changes/removals/24948-ES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ implement a ``convert`` method that not only accepted instances of the unit,
but also unitless values (which are passed through as is). This is no longer
the case (``convert`` is never called with a unitless value), and such support
in `.StrCategoryConverter` is deprecated. Likewise, the
`.ConversionInterface.is_numlike` helper is deprecated.
``.ConversionInterface.is_numlike`` helper is deprecated.

Consider calling `.Axis.convert_units` instead, which still supports unitless
values.
Expand Down
2 changes: 1 addition & 1 deletion doc/api/prev_api_changes/api_changes_3.5.0/removals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ Arguments
- The *dummy* parameter of `.RendererPgf` has been removed.
- The *props* parameter of `.Shadow` has been removed; use keyword arguments
instead.
- The *recursionlimit* parameter of `matplotlib.test` has been removed.
- The *recursionlimit* parameter of ``matplotlib.test`` has been removed.
- The *label* parameter of `.Tick` has no effect and has been removed.
- `~.ticker.MaxNLocator` no longer accepts a positional parameter and the
keyword argument *nbins* simultaneously because they specify the same
Expand Down
5 changes: 0 additions & 5 deletions doc/api/testing_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
**********************


:func:`matplotlib.test`
=======================

.. autofunction:: matplotlib.test

:mod:`matplotlib.testing`
=========================

Expand Down
58 changes: 0 additions & 58 deletions lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1278,12 +1278,6 @@ def is_interactive():
return rcParams['interactive']


default_test_modules = [
'matplotlib.tests',
'mpl_toolkits.tests',
]


def _init_tests():
# The version of FreeType to install locally for running the
# tests. This must match the value in `setupext.py`
Expand All @@ -1302,58 +1296,6 @@ def _init_tests():
"" if ft2font.__freetype_build_type__ == 'local' else "not "))


@_api.deprecated("3.5", alternative='pytest')
def test(verbosity=None, coverage=False, **kwargs):
"""Run the matplotlib test suite."""

try:
import pytest
except ImportError:
print("matplotlib.test requires pytest to run.")
return -1

if not os.path.isdir(os.path.join(os.path.dirname(__file__), 'tests')):
print("Matplotlib test data is not installed")
return -1

old_backend = get_backend()
try:
use('agg')

args = kwargs.pop('argv', [])
provide_default_modules = True
use_pyargs = True
for arg in args:
if any(arg.startswith(module_path)
for module_path in default_test_modules):
provide_default_modules = False
break
if os.path.exists(arg):
provide_default_modules = False
use_pyargs = False
break
if use_pyargs:
args += ['--pyargs']
if provide_default_modules:
args += default_test_modules

if coverage:
args += ['--cov']

if verbosity:
args += ['-' + 'v' * verbosity]

retcode = pytest.main(args, **kwargs)
finally:
if old_backend.lower() != 'agg':
use(old_backend)

return retcode


test.__test__ = False # pytest: this function is not a test


def _replacer(data, value):
"""
Either returns ``data[value]`` or passes ``data`` back, converts either to
Expand Down
14 changes: 0 additions & 14 deletions lib/matplotlib/axes/_axes.py
Loading