summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-11-09 19:04:01 +0100
committerGeorg Brandl <georg@python.org>2014-11-09 19:04:01 +0100
commit216804f3142da96f350bf9e5cb86a0682bd241fb (patch)
treefd139a7f1e3628465262f65c9abb755979dc1951
parent582e2c694bc7fdaa127cd7e58ca564c7d218aef3 (diff)
downloadsphinx-216804f3142da96f350bf9e5cb86a0682bd241fb.tar.gz
Deprecate make_admonition.
-rw-r--r--sphinx/util/compat.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/sphinx/util/compat.py b/sphinx/util/compat.py
index 9e5d619d..a0cb566d 100644
--- a/sphinx/util/compat.py
+++ b/sphinx/util/compat.py
@@ -8,19 +8,19 @@
:copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
+import warnings
from docutils import nodes
from docutils import __version__ as _du_version
docutils_version = tuple(int(x) for x in _du_version.split('.')[:2])
+
def make_admonition(node_class, name, arguments, options, content, lineno,
content_offset, block_text, state, state_machine):
- #if not content:
- # error = state_machine.reporter.error(
- # 'The "%s" admonition is empty; content required.' % (name),
- # nodes.literal_block(block_text, block_text), line=lineno)
- # return [error]
+ warnings.warn('make_admonition is deprecated, use '
+ 'docutils.parsers.rst.directives.admonitions.BaseAdmonition '
+ 'instead', DeprecationWarning, stacklevel=1)
text = '\n'.join(content)
admonition_node = node_class(text)
if arguments: