summaryrefslogtreecommitdiff
path: root/sphinx/directives/other.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/directives/other.py')
-rw-r--r--sphinx/directives/other.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/sphinx/directives/other.py b/sphinx/directives/other.py
index e1ba1a279..252e6522a 100644
--- a/sphinx/directives/other.py
+++ b/sphinx/directives/other.py
@@ -14,8 +14,9 @@ from docutils.parsers.rst.directives.misc import Class
from docutils.parsers.rst.directives.misc import Include as BaseInclude
from six.moves import range
-from sphinx import addnodes
-from sphinx.locale import versionlabels, _
+from sphinx import addnodes, locale
+from sphinx.deprecation import DeprecatedDict, RemovedInSphinx30Warning
+from sphinx.locale import _
from sphinx.util import url_re, docname_join
from sphinx.util.matching import patfilter
from sphinx.util.nodes import explicit_title_re, set_source_info, \
@@ -27,6 +28,20 @@ if False:
from sphinx.application import Sphinx # NOQA
+versionlabels = {
+ 'versionadded': _('New in version %s'),
+ 'versionchanged': _('Changed in version %s'),
+ 'deprecated': _('Deprecated since version %s'),
+} # type: Dict[unicode, unicode]
+
+locale.versionlabels = DeprecatedDict(
+ versionlabels,
+ 'sphinx.locale.versionlabels is deprecated. '
+ 'Please use sphinx.directives.other.versionlabels instead.',
+ RemovedInSphinx30Warning
+)
+
+
def int_or_nothing(argument):
# type: (unicode) -> int
if not argument: