diff --git a/doc/api/next_api_changes/removals/24XXX-OG.rst b/doc/api/next_api_changes/removals/24XXX-OG.rst new file mode 100644 index 000000000000..9e08140110ba --- /dev/null +++ b/doc/api/next_api_changes/removals/24XXX-OG.rst @@ -0,0 +1,11 @@ +Deprecated modules removed +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following deprecated modules are removed: + +* ``afm`` +* ``docstring`` +* ``fontconfig_pattern`` +* ``tight_bbox`` +* ``tight_layout`` +* ``type1font`` diff --git a/lib/matplotlib/afm.py b/lib/matplotlib/afm.py deleted file mode 100644 index d95c88a0e2b4..000000000000 --- a/lib/matplotlib/afm.py +++ /dev/null @@ -1,3 +0,0 @@ -from matplotlib._afm import * # noqa: F401, F403 -from matplotlib import _api -_api.warn_deprecated("3.6", name=__name__, obj_type="module") diff --git a/lib/matplotlib/docstring.py b/lib/matplotlib/docstring.py deleted file mode 100644 index b6ddcf5acd10..000000000000 --- a/lib/matplotlib/docstring.py +++ /dev/null @@ -1,4 +0,0 @@ -from matplotlib._docstring import * # noqa: F401, F403 -from matplotlib import _api -_api.warn_deprecated( - "3.6", obj_type='module', name=f"{__name__}") diff --git a/lib/matplotlib/fontconfig_pattern.py b/lib/matplotlib/fontconfig_pattern.py deleted file mode 100644 index 292435b1487a..000000000000 --- a/lib/matplotlib/fontconfig_pattern.py +++ /dev/null @@ -1,20 +0,0 @@ -import re -from pyparsing import ParseException - -from matplotlib._fontconfig_pattern import * # noqa: F401, F403 -from matplotlib._fontconfig_pattern import ( - parse_fontconfig_pattern, _family_punc, _value_punc) -from matplotlib import _api -_api.warn_deprecated("3.6", name=__name__, obj_type="module") - - -family_unescape = re.compile(r'\\([%s])' % _family_punc).sub -value_unescape = re.compile(r'\\([%s])' % _value_punc).sub -family_escape = re.compile(r'([%s])' % _family_punc).sub -value_escape = re.compile(r'([%s])' % _value_punc).sub - - -class FontconfigPatternParser: - ParseException = ParseException - - def parse(self, pattern): return parse_fontconfig_pattern(pattern) diff --git a/lib/matplotlib/tight_bbox.py b/lib/matplotlib/tight_bbox.py deleted file mode 100644 index 88c4c1ec51af..000000000000 --- a/lib/matplotlib/tight_bbox.py +++ /dev/null @@ -1,3 +0,0 @@ -from matplotlib._tight_bbox import * # noqa: F401, F403 -from matplotlib import _api -_api.warn_deprecated("3.6", name=__name__, obj_type="module") diff --git a/lib/matplotlib/tight_layout.py b/lib/matplotlib/tight_layout.py deleted file mode 100644 index 233e96c0d47a..000000000000 --- a/lib/matplotlib/tight_layout.py +++ /dev/null @@ -1,13 +0,0 @@ -from matplotlib._tight_layout import * # noqa: F401, F403 -from matplotlib import _api -_api.warn_deprecated("3.6", name=__name__, obj_type="module") - - -@_api.deprecated("3.6", alternative="figure.canvas.get_renderer()") -def get_renderer(fig): - canvas = fig.canvas - if canvas and hasattr(canvas, "get_renderer"): - return canvas.get_renderer() - else: - from . import backend_bases - return backend_bases._get_renderer(fig) diff --git a/lib/matplotlib/type1font.py b/lib/matplotlib/type1font.py deleted file mode 100644 index 85d93c714dad..000000000000 --- a/lib/matplotlib/type1font.py +++ /dev/null @@ -1,3 +0,0 @@ -from matplotlib._type1font import * # noqa: F401, F403 -from matplotlib import _api -_api.warn_deprecated("3.6", name=__name__, obj_type="module")