From 52fde7e7b1a304c69021f3a801f128b9f3c7e26d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Freitag?= Date: Thu, 21 Jan 2021 16:39:40 +0100 Subject: [PATCH] Match linkcheck deprecation warning version with deprecated.rst Deprecated.rst states the node_line_or_0 helper will be removed in Sphinx 5.0, use a RemovedInSphinx50Warning. --- sphinx/builders/linkcheck.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py index ce328df33b..f405910e97 100644 --- a/sphinx/builders/linkcheck.py +++ b/sphinx/builders/linkcheck.py @@ -29,7 +29,7 @@ from requests.exceptions import HTTPError, TooManyRedirects from sphinx.application import Sphinx from sphinx.builders import Builder -from sphinx.deprecation import RemovedInSphinx40Warning +from sphinx.deprecation import RemovedInSphinx50Warning from sphinx.locale import __ from sphinx.transforms.post_transforms import SphinxPostTransform from sphinx.util import encode_uri, logging, requests @@ -60,7 +60,7 @@ def node_line_or_0(node: Element) -> int: tuple used by the PriorityQueue, keep an homogeneous type for comparison. """ warnings.warn('node_line_or_0() is deprecated.', - RemovedInSphinx40Warning, stacklevel=2) + RemovedInSphinx50Warning, stacklevel=2) return get_node_line(node) or 0