Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-03-20 19:09:03 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2021-03-22 17:51:54 +0300
commit6007bbf797000e818daa220aa39e46c744240024 (patch)
tree03d155e92f9873af57b735962af0a8fecdd8a6fa /sphinx/ext
parentf60ee524bae86fcbdfbf96fd849b65cccd1ac917 (diff)
Deprecate DocumenterBridge.warn()
Since 1.6, sphinx.util.logging module became the default logging interface of Sphinx. It allows sphinx-components to output log without the app (or env) object. According to the policy, DocumenterBridge.warn() is no longer needed and should be replaced by the logging module.
Diffstat (limited to 'sphinx/ext')
-rw-r--r--sphinx/ext/autodoc/directive.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sphinx/ext/autodoc/directive.py b/sphinx/ext/autodoc/directive.py
index a6608698d..8ed622d23 100644
--- a/sphinx/ext/autodoc/directive.py
+++ b/sphinx/ext/autodoc/directive.py
@@ -61,6 +61,9 @@ class DocumenterBridge:
self.state = state
def warn(self, msg: str) -> None:
+ warnings.warn('DocumenterBridge.warn is deprecated. Plase use sphinx.util.logging '
+ 'module instead.',
+ RemovedInSphinx60Warning, stacklevel=2)
logger.warning(msg, location=(self.env.docname, self.lineno))
@property