mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
deprecate PyClassmember class
This commit is contained in:
parent
fcc964b66f
commit
b0b3f5a677
1
CHANGES
1
CHANGES
@ -33,6 +33,7 @@ Deprecated
|
||||
* ``sphinx.directives.TabularColumns``
|
||||
* ``sphinx.directives.TocTree``
|
||||
* ``sphinx.directives.VersionChange``
|
||||
* ``sphinx.domains.python.PyClassmember``
|
||||
* ``sphinx.domains.std.StandardDomain._resolve_citation_xref()``
|
||||
* ``sphinx.domains.std.StandardDomain.note_citations()``
|
||||
* ``sphinx.domains.std.StandardDomain.note_citation_refs()``
|
||||
|
@ -116,6 +116,14 @@ The following is a list of deprecated interfaces.
|
||||
- 4.0
|
||||
- ``sphinx.directives.other.VersionChange``
|
||||
|
||||
* - ``sphinx.domains.python.PyClassmember``
|
||||
- 2.1
|
||||
- 4.0
|
||||
- ``sphinx.domains.python.PyAttribute``,
|
||||
``sphinx.domains.python.PyMethod``,
|
||||
``sphinx.domains.python.PyClassMethod`` and
|
||||
``sphinx.domains.python.PyStaticMethod``
|
||||
|
||||
* - ``sphinx.domains.std.StandardDomain._resolve_citation_xref()``
|
||||
- 2.1
|
||||
- 4.0
|
||||
|
@ -9,13 +9,16 @@
|
||||
"""
|
||||
|
||||
import re
|
||||
import warnings
|
||||
from typing import cast
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.parsers.rst import directives
|
||||
|
||||
from sphinx import addnodes, locale
|
||||
from sphinx.deprecation import DeprecatedDict, RemovedInSphinx30Warning
|
||||
from sphinx.deprecation import (
|
||||
DeprecatedDict, RemovedInSphinx30Warning, RemovedInSphinx40Warning
|
||||
)
|
||||
from sphinx.directives import ObjectDescription
|
||||
from sphinx.domains import Domain, ObjType, Index, IndexEntry
|
||||
from sphinx.locale import _, __
|
||||
@ -453,6 +456,13 @@ class PyClassmember(PyObject):
|
||||
Description of a class member (methods, attributes).
|
||||
"""
|
||||
|
||||
def run(self):
|
||||
# type: () -> List[nodes.Node]
|
||||
warnings.warn('PyClassmember is deprecated.',
|
||||
RemovedInSphinx40Warning)
|
||||
|
||||
return super().run()
|
||||
|
||||
def needs_arglist(self):
|
||||
# type: () -> bool
|
||||
return self.objtype.endswith('method')
|
||||
|
Loading…
Reference in New Issue
Block a user