summaryrefslogtreecommitdiff
path: root/sphinx/ext/apidoc.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-05-04 17:26:26 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2019-05-04 18:42:22 +0900
commitfa560ebf958e0319353db1da04e36ccef45c76c4 (patch)
tree4b832b0d73fa4620d832b5656acb6b07eaaabb0b /sphinx/ext/apidoc.py
parentb93f53c7e4c84922a77f63cc0e1dca0a60a72201 (diff)
downloadsphinx-git-fa560ebf958e0319353db1da04e36ccef45c76c4.tar.gz
apidoc: Deprecate unused functions
Diffstat (limited to 'sphinx/ext/apidoc.py')
-rw-r--r--sphinx/ext/apidoc.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/sphinx/ext/apidoc.py b/sphinx/ext/apidoc.py
index af77133b2..2243e0644 100644
--- a/sphinx/ext/apidoc.py
+++ b/sphinx/ext/apidoc.py
@@ -19,12 +19,14 @@ import glob
import locale
import os
import sys
+import warnings
from fnmatch import fnmatch
from os import path
import sphinx.locale
from sphinx import __display_version__, package_dir
from sphinx.cmd.quickstart import EXTENSIONS
+from sphinx.deprecation import RemovedInSphinx40Warning
from sphinx.locale import __
from sphinx.util import rst
from sphinx.util.osutil import FileAvoidWrite, ensuredir
@@ -82,6 +84,8 @@ def write_file(name, text, opts):
def format_heading(level, text, escape=True):
# type: (int, str, bool) -> str
"""Create a heading of <level> [1, 2 or 3 supported]."""
+ warnings.warn('format_warning() is deprecated.',
+ RemovedInSphinx40Warning)
if escape:
text = rst.escape(text)
underlining = ['=', '-', '~', ][level - 1] * len(text)
@@ -91,6 +95,8 @@ def format_heading(level, text, escape=True):
def format_directive(module, package=None):
# type: (str, str) -> str
"""Create the automodule directive and add the options."""
+ warnings.warn('format_directive() is deprecated.',
+ RemovedInSphinx40Warning)
directive = '.. automodule:: %s\n' % makename(package, module)
for option in OPTIONS:
directive += ' :%s:\n' % option