summaryrefslogtreecommitdiff
path: root/sphinx/roles.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-05-03 22:40:19 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-05-03 23:34:35 +0900
commit41b4a77dea51cf5eb16f9a3fdc27426827313d54 (patch)
treeaad1d45e1e780ef69a4872d1d4122d5292fc0755 /sphinx/roles.py
parenta5cba8cdbb9f44721885c8555bf875df1f59e199 (diff)
downloadsphinx-git-41b4a77dea51cf5eb16f9a3fdc27426827313d54.tar.gz
Add stacklevel parameter to warnings.warn() call
Diffstat (limited to 'sphinx/roles.py')
-rw-r--r--sphinx/roles.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/roles.py b/sphinx/roles.py
index ff24fcf55..57d11c269 100644
--- a/sphinx/roles.py
+++ b/sphinx/roles.py
@@ -574,7 +574,7 @@ def index_role(typ: str, rawtext: str, text: str, lineno: int, inliner: Inliner,
class Index(ReferenceRole):
def run(self) -> Tuple[List[Node], List[system_message]]:
- warnings.warn('Index role is deprecated.', RemovedInSphinx40Warning)
+ warnings.warn('Index role is deprecated.', RemovedInSphinx40Warning, stacklevel=2)
target_id = 'index-%s' % self.env.new_serialno('index')
if self.has_explicit_title:
# if an explicit target is given, process it as a full entry