8000 Deprecate math_symbol_table function directive by alexrudy · Pull Request #14763 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Deprecate math_symbol_table function directive #14763

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
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
19 changes: 16 additions & 3 deletions doc/sphinxext/math_symbol_table.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from docutils.parsers.rst import Directive

from matplotlib import mathtext
from matplotlib import cbook


symbols = [
Expand Down Expand Up @@ -137,16 +140,26 @@ def get_n(n, l):
return []


@cbook.deprecated("3.2", alternative="MathSymbolTableDirective")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is not installed; you can just remove the function entirely.

def math_symbol_table_directive(
name, arguments, options, content, lineno,
content_offset, block_text, state, state_machine):
return run(state_machine)


class MathSymbolTableDirective(Directive):
has_content = False
required_arguments = 0
optional_arguments = 0
final_argument_whitespace = False
option_spec = {}

def run(self):
return run(self.state_machine)


def setup(app):
app.add_directive(
'math_symbol_table', math_symbol_table_directive,
False, (0, 1, 0))
app.add_directive("math_symbol_table", MathSymbolTableDirective)

metadata = {'parallel_read_safe': True, 'parallel_write_safe': True}
return metadata
Expand Down
0