diff --git a/lib/matplotlib/sphinxext/plot_directive.py b/lib/matplotlib/sphinxext/plot_directive.py index 6a9d316dfbf4..3136e6ea5631 100644 --- a/lib/matplotlib/sphinxext/plot_directive.py +++ b/lib/matplotlib/sphinxext/plot_directive.py @@ -197,7 +197,7 @@ def _option_format(arg): def _deprecated_option_encoding(arg): - _api.warn_deprecated("3.5", "encoding", obj_type="option") + _api.warn_deprecated("3.5", name="encoding", obj_type="option") return directives.encoding(arg) diff --git a/lib/matplotlib/tests/tinypages/some_plots.rst b/lib/matplotlib/tests/tinypages/some_plots.rst index bab58fd3a8c2..fdf7db93bc7c 100644 --- a/lib/matplotlib/tests/tinypages/some_plots.rst +++ b/lib/matplotlib/tests/tinypages/some_plots.rst @@ -120,9 +120,11 @@ Plot 14 uses ``include-source``: # Only a comment -Plot 15 uses an external file with the plot commands and a caption: +Plot 15 uses an external file with the plot commands and a caption (the +encoding is ignored and just verifies the deprecation is not broken): .. plot:: range4.py + :encoding: utf-8 This is the caption for plot 15.