mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Deprecate: The module argument of find_autosummary_in_docstring()
This commit is contained in:
parent
8cc0b890bd
commit
53f0d4e646
3
CHANGES
3
CHANGES
@ -10,6 +10,9 @@ Incompatible changes
|
||||
Deprecated
|
||||
----------
|
||||
|
||||
* The ``module`` argument of ``sphinx.ext.autosummary.generate.
|
||||
find_autosummary_in_docstring()``
|
||||
|
||||
Features added
|
||||
--------------
|
||||
|
||||
|
@ -26,6 +26,12 @@ The following is a list of deprecated interfaces.
|
||||
- (will be) Removed
|
||||
- Alternatives
|
||||
|
||||
* - The ``module`` argument of
|
||||
``sphinx.ext.autosummary.generate.find_autosummary_in_docstring()``
|
||||
- 3.0
|
||||
- 5.0
|
||||
- N/A
|
||||
|
||||
* - ``desc_signature['first']``
|
||||
-
|
||||
- 3.0
|
||||
|
@ -33,7 +33,7 @@ import sphinx.locale
|
||||
from sphinx import __display_version__
|
||||
from sphinx import package_dir
|
||||
from sphinx.builders import Builder
|
||||
from sphinx.deprecation import RemovedInSphinx40Warning
|
||||
from sphinx.deprecation import RemovedInSphinx40Warning, RemovedInSphinx50Warning
|
||||
from sphinx.ext.autodoc import Documenter
|
||||
from sphinx.ext.autosummary import import_by_name, get_documenter
|
||||
from sphinx.jinja2glue import BuiltinTemplateLoader
|
||||
@ -332,6 +332,10 @@ def find_autosummary_in_docstring(name: str, module: str = None, filename: str =
|
||||
|
||||
See `find_autosummary_in_lines`.
|
||||
"""
|
||||
if module:
|
||||
warnings.warn('module argument for find_autosummary_in_docstring() is deprecated.',
|
||||
RemovedInSphinx50Warning)
|
||||
|
||||
try:
|
||||
real_name, obj, parent, modname = import_by_name(name)
|
||||
lines = pydoc.getdoc(obj).splitlines()
|
||||
|
Loading…
Reference in New Issue
Block a user