From 90ced6c4b7ce05a41557c178938e94fab7129c99 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 24 Jan 2021 14:34:29 +0900 Subject: [PATCH] Fix #6550: Emit a deprecation warning for html_add_permalinks Let's start to emit a deprecation warning for html_add_permalinks since the major release v4.0. --- sphinx/builders/html/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sphinx/builders/html/__init__.py b/sphinx/builders/html/__init__.py index 332c7c989..83186bfa4 100644 --- a/sphinx/builders/html/__init__.py +++ b/sphinx/builders/html/__init__.py @@ -1210,6 +1210,9 @@ def validate_html_favicon(app: Sphinx, config: Config) -> None: def migrate_html_add_permalinks(app: Sphinx, config: Config) -> None: """Migrate html_add_permalinks to html_permalinks*.""" if config.html_add_permalinks: + # RemovedInSphinx60Warning + logger.warning(__('html_add_permalinks has been deprecated since v3.5.0. ' + 'Please use html_permalinks and html_permalinks_icon instead.')) if (isinstance(config.html_add_permalinks, bool) and config.html_add_permalinks is False): config.html_permalinks = False # type: ignore