mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Drop deprecated termsep node
This commit is contained in:
@@ -55,4 +55,3 @@ You should not need to generate the nodes below in extensions.
|
||||
.. autoclass:: start_of_file
|
||||
.. autoclass:: productionlist
|
||||
.. autoclass:: production
|
||||
.. autoclass:: termsep
|
||||
|
||||
@@ -9,10 +9,7 @@
|
||||
:license: BSD, see LICENSE for details.
|
||||
"""
|
||||
|
||||
import warnings
|
||||
|
||||
from docutils import nodes
|
||||
from sphinx.deprecation import RemovedInSphinx16Warning
|
||||
|
||||
|
||||
class translatable(object):
|
||||
@@ -273,19 +270,6 @@ class abbreviation(nodes.Inline, nodes.TextElement):
|
||||
"""Node for abbreviations with explanations."""
|
||||
|
||||
|
||||
class termsep(nodes.Structural, nodes.Element):
|
||||
"""Separates two terms within a <term> node.
|
||||
|
||||
.. versionchanged:: 1.4
|
||||
sphinx.addnodes.termsep is deprecated. It will be removed at Sphinx-1.6.
|
||||
"""
|
||||
|
||||
def __init__(self, *args, **kw):
|
||||
warnings.warn('sphinx.addnodes.termsep will be removed at Sphinx-1.6',
|
||||
RemovedInSphinx16Warning, stacklevel=2)
|
||||
super(termsep, self).__init__(*args, **kw)
|
||||
|
||||
|
||||
class manpage(nodes.Inline, nodes.TextElement):
|
||||
"""Node for references to manpages."""
|
||||
|
||||
|
||||
@@ -13,14 +13,12 @@ import sys
|
||||
import posixpath
|
||||
import os
|
||||
import copy
|
||||
import warnings
|
||||
|
||||
from six import string_types
|
||||
from docutils import nodes
|
||||
from docutils.writers.html4css1 import Writer, HTMLTranslator as BaseTranslator
|
||||
|
||||
from sphinx import addnodes
|
||||
from sphinx.deprecation import RemovedInSphinx16Warning
|
||||
from sphinx.locale import admonitionlabels, _
|
||||
from sphinx.util import logging
|
||||
from sphinx.util.images import get_image_size
|
||||
@@ -697,14 +695,6 @@ class HTMLTranslator(BaseTranslator):
|
||||
def depart_definition(self, node):
|
||||
self.body.append('</dd>\n')
|
||||
|
||||
def visit_termsep(self, node):
|
||||
warnings.warn('sphinx.addnodes.termsep will be removed at Sphinx-1.6. '
|
||||
'This warning is displayed because some Sphinx extension '
|
||||
'uses sphinx.addnodes.termsep. Please report it to '
|
||||
'author of the extension.', RemovedInSphinx16Warning)
|
||||
self.body.append('<br />')
|
||||
raise nodes.SkipNode
|
||||
|
||||
def visit_manpage(self, node):
|
||||
return self.visit_literal_emphasis(node)
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
import re
|
||||
import sys
|
||||
from os import path
|
||||
import warnings
|
||||
|
||||
from six import itervalues, text_type
|
||||
from docutils import nodes, writers
|
||||
@@ -24,7 +23,6 @@ from docutils.writers.latex2e import Babel
|
||||
from sphinx import addnodes
|
||||
from sphinx import highlighting
|
||||
from sphinx.errors import SphinxError
|
||||
from sphinx.deprecation import RemovedInSphinx16Warning
|
||||
from sphinx.locale import admonitionlabels, _
|
||||
from sphinx.util import split_into, logging
|
||||
from sphinx.util.i18n import format_date
|
||||
@@ -1468,15 +1466,6 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
self.unrestrict_footnote(node)
|
||||
self.in_term -= 1
|
||||
|
||||
def visit_termsep(self, node):
|
||||
# type: (nodes.Node) -> None
|
||||
warnings.warn('sphinx.addnodes.termsep will be removed at Sphinx-1.6. '
|
||||
'This warning is displayed because some Sphinx extension '
|
||||
'uses sphinx.addnodes.termsep. Please report it to '
|
||||
'author of the extension.', RemovedInSphinx16Warning)
|
||||
self.body.append(', ')
|
||||
raise nodes.SkipNode
|
||||
|
||||
def visit_classifier(self, node):
|
||||
# type: (nodes.Node) -> None
|
||||
self.body.append('{[}')
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
:license: BSD, see LICENSE for details.
|
||||
"""
|
||||
|
||||
import warnings
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.writers.manpage import (
|
||||
MACRO_DEF,
|
||||
@@ -19,7 +17,6 @@ from docutils.writers.manpage import (
|
||||
)
|
||||
|
||||
from sphinx import addnodes
|
||||
from sphinx.deprecation import RemovedInSphinx16Warning
|
||||
from sphinx.locale import admonitionlabels, _
|
||||
from sphinx.util import logging
|
||||
import sphinx.util.docutils
|
||||
@@ -219,14 +216,6 @@ class ManualPageTranslator(BaseTranslator):
|
||||
else:
|
||||
BaseTranslator.visit_term(self, node)
|
||||
|
||||
def visit_termsep(self, node):
|
||||
warnings.warn('sphinx.addnodes.termsep will be removed at Sphinx-1.6. '
|
||||
'This warning is displayed because some Sphinx extension '
|
||||
'uses sphinx.addnodes.termsep. Please report it to '
|
||||
'author of the extension.', RemovedInSphinx16Warning)
|
||||
self.body.append(', ')
|
||||
raise nodes.SkipNode
|
||||
|
||||
# overwritten -- we don't want source comments to show up
|
||||
def visit_comment(self, node):
|
||||
raise nodes.SkipNode
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
import re
|
||||
import textwrap
|
||||
from os import path
|
||||
import warnings
|
||||
|
||||
from six import itervalues
|
||||
from six.moves import range
|
||||
@@ -21,7 +20,6 @@ from docutils import nodes, writers
|
||||
|
||||
from sphinx import addnodes, __display_version__
|
||||
from sphinx.errors import ExtensionError
|
||||
from sphinx.deprecation import RemovedInSphinx16Warning
|
||||
from sphinx.locale import admonitionlabels, _
|
||||
from sphinx.util import logging
|
||||
from sphinx.util.i18n import format_date
|
||||
@@ -1071,18 +1069,6 @@ class TexinfoTranslator(nodes.NodeVisitor):
|
||||
# type: (nodes.Node) -> None
|
||||
pass
|
||||
|
||||
def visit_termsep(self, node):
|
||||
# type: (nodes.Node) -> None
|
||||
warnings.warn('sphinx.addnodes.termsep will be removed at Sphinx-1.6. '
|
||||
'This warning is displayed because some Sphinx extension '
|
||||
'uses sphinx.addnodes.termsep. Please report it to '
|
||||
'author of the extension.', RemovedInSphinx16Warning)
|
||||
self.body.append('\n%s ' % self.at_item_x)
|
||||
|
||||
def depart_termsep(self, node):
|
||||
# type: (nodes.Node) -> None
|
||||
pass
|
||||
|
||||
def visit_classifier(self, node):
|
||||
# type: (nodes.Node) -> None
|
||||
self.body.append(' : ')
|
||||
|
||||
@@ -12,7 +12,6 @@ import os
|
||||
import re
|
||||
import textwrap
|
||||
from itertools import groupby
|
||||
import warnings
|
||||
|
||||
from six.moves import zip_longest
|
||||
|
||||
@@ -20,7 +19,6 @@ from docutils import nodes, writers
|
||||
from docutils.utils import column_width
|
||||
|
||||
from sphinx import addnodes
|
||||
from sphinx.deprecation import RemovedInSphinx16Warning
|
||||
from sphinx.locale import admonitionlabels, _
|
||||
from sphinx.util import logging
|
||||
|
||||
@@ -774,15 +772,6 @@ class TextTranslator(nodes.NodeVisitor):
|
||||
if not self._classifier_count_in_li:
|
||||
self.end_state(end=None)
|
||||
|
||||
def visit_termsep(self, node):
|
||||
# type: (nodes.Node) -> None
|
||||
warnings.warn('sphinx.addnodes.termsep will be removed at Sphinx-1.6. '
|
||||
'This warning is displayed because some Sphinx extension '
|
||||
'uses sphinx.addnodes.termsep. Please report it to '
|
||||
'author of the extension.', RemovedInSphinx16Warning)
|
||||
self.add_text(', ')
|
||||
raise nodes.SkipNode
|
||||
|
||||
def visit_classifier(self, node):
|
||||
# type: (nodes.Node) -> None
|
||||
self.add_text(' : ')
|
||||
|
||||
Reference in New Issue
Block a user