mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #6965 from tk0miya/deprecate_get_module_source
Deprecate sphinx.util:get_module_source()
This commit is contained in:
commit
402d0114b1
1
CHANGES
1
CHANGES
@ -14,6 +14,7 @@ Deprecated
|
|||||||
* ``sphinx.environment.collectors.indexentries.IndexEntriesCollector``
|
* ``sphinx.environment.collectors.indexentries.IndexEntriesCollector``
|
||||||
* ``sphinx.io.FiletypeNotFoundError``
|
* ``sphinx.io.FiletypeNotFoundError``
|
||||||
* ``sphinx.io.get_filetype()``
|
* ``sphinx.io.get_filetype()``
|
||||||
|
* ``sphinx.util.get_module_source()``
|
||||||
|
|
||||||
Features added
|
Features added
|
||||||
--------------
|
--------------
|
||||||
|
@ -46,6 +46,11 @@ The following is a list of deprecated interfaces.
|
|||||||
- 4.0
|
- 4.0
|
||||||
- ``sphinx.util.get_filetype()``
|
- ``sphinx.util.get_filetype()``
|
||||||
|
|
||||||
|
* - ``sphinx.util.get_module_source()``
|
||||||
|
- 2.4
|
||||||
|
- 4.0
|
||||||
|
- N/A
|
||||||
|
|
||||||
* - ``sphinx.builders.gettext.POHEADER``
|
* - ``sphinx.builders.gettext.POHEADER``
|
||||||
- 2.3
|
- 2.3
|
||||||
- 4.0
|
- 4.0
|
||||||
|
@ -282,6 +282,8 @@ def get_module_source(modname: str) -> Tuple[str, str]:
|
|||||||
Can return ('file', 'filename') in which case the source is in the given
|
Can return ('file', 'filename') in which case the source is in the given
|
||||||
file, or ('string', 'source') which which case the source is the string.
|
file, or ('string', 'source') which which case the source is the string.
|
||||||
"""
|
"""
|
||||||
|
warnings.warn('get_module_source() is deprecated.',
|
||||||
|
RemovedInSphinx40Warning, stacklevel=2)
|
||||||
try:
|
try:
|
||||||
mod = import_module(modname)
|
mod = import_module(modname)
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
|
Loading…
Reference in New Issue
Block a user