Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit babdac4

Browse filesBrowse files
committed
Deprecate :encoding: option to .. plot::, which has no effect since 2011
(Its value is not read anywhere in the implementation since a205f54.)
1 parent 450cdc6 commit babdac4
Copy full SHA for babdac4

File tree

Expand file treeCollapse file tree

2 files changed

+9
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+9
-1
lines changed
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
``:encoding:`` option to ``.. plot`` directive
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
This option has had no effect since Matplotlib 1.3.1, and is now deprecated.

‎lib/matplotlib/sphinxext/plot_directive.py

Copy file name to clipboardExpand all lines: lib/matplotlib/sphinxext/plot_directive.py
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,11 @@ def _option_format(arg):
194194
return directives.choice(arg, ('python', 'doctest'))
195195

196196

197+
def _deprecated_option_encoding(arg):
198+
_api.warn_deprecated("3.5", "encoding", obj_type="option")
199+
return directives.encoding(arg)
200+
201+
197202
def mark_plot_labels(app, document):
198203
"""
199204
To make plots referenceable, we need to move the reference from the
@@ -242,7 +247,7 @@ class PlotDirective(Directive):
242247
'format': _option_format,
243248
'context': _option_context,
244249
'nofigs': directives.flag,
245-
'encoding': directives.encoding,
250+
'encoding': _deprecated_option_encoding,
246251
'caption': directives.unchanged,
247252
}
248253

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.