mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Deprecate DescDirective
This commit is contained in:
parent
7d3ad79392
commit
5648b2eb88
1
CHANGES
1
CHANGES
@ -27,6 +27,7 @@ Incompatible changes
|
||||
Deprecated
|
||||
----------
|
||||
|
||||
* ``sphinx.directives.DescDirective``
|
||||
* ``sphinx.domains.std.StandardDomain.add_object()``
|
||||
* ``sphinx.parsers.Parser.app``
|
||||
* ``sphinx.testing.path.Path.text()``
|
||||
|
@ -26,6 +26,11 @@ The following is a list of deprecated interfaces.
|
||||
- (will be) Removed
|
||||
- Alternatives
|
||||
|
||||
* - ``sphinx.directives.DescDirective``
|
||||
- 3.0
|
||||
- 5.0
|
||||
- ``sphinx.directives.ObjectDescription``
|
||||
|
||||
* - ``sphinx.domains.std.StandardDomain.add_object()``
|
||||
- 3.0
|
||||
- 5.0
|
||||
|
@ -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]:
|
||||
|
Loading…
Reference in New Issue
Block a user