diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-02-17 20:14:16 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-02-22 06:15:20 +0300 |
commit | 5648b2eb8835140bce6b21f9b02f6ba6ad2a9db0 (patch) | |
tree | 35ec512ea7d75a2f30f026ba7a2b15ac96ebdac0 /sphinx/directives | |
parent | 7d3ad79392c4fc1ee9ad162b7cc107f391549b58 (diff) |
Deprecate DescDirective
Diffstat (limited to 'sphinx/directives')
-rw-r--r-- | sphinx/directives/__init__.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sphinx/directives/__init__.py b/sphinx/directives/__init__.py index 9a2fb4412..61cd53302 100644 --- a/sphinx/directives/__init__.py +++ b/sphinx/directives/__init__.py @@ -18,7 +18,9 @@ from docutils.parsers.rst import directives, roles from sphinx import addnodes from sphinx.addnodes import desc_signature -from sphinx.deprecation import RemovedInSphinx40Warning, deprecated_alias +from sphinx.deprecation import ( + RemovedInSphinx40Warning, RemovedInSphinx50Warning, deprecated_alias +) from sphinx.util import docutils from sphinx.util.docfields import DocFieldTransformer, Field, TypedField from sphinx.util.docutils import SphinxDirective @@ -285,9 +287,11 @@ deprecated_alias('sphinx.directives', }, RemovedInSphinx40Warning) - -# backwards compatible old name (will be marked deprecated in 3.0) -DescDirective = ObjectDescription +deprecated_alias('sphinx.directives', + { + 'DescDirective': ObjectDescription, + }, + RemovedInSphinx50Warning) def setup(app: "Sphinx") -> Dict[str, Any]: |