From a58b026554d39b9ff7884b3a72dbb076457592f8 Mon Sep 17 00:00:00 2001 From: Michel Albert Date: Thu, 20 Aug 2026 07:17:33 +0200 Subject: [PATCH 1/3] Add missing "type" attribute to logger This fixed an issue that prevented these log-messages from being suppressed via `suppress_warnings`. Fixes #14625 --- CHANGES.rst | 4 ++++ sphinx/directives/other.py | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index ad6d698341a..f62cee342f0 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -13,6 +13,10 @@ Bugs fixed English stemmer) and Dutch (which uses the Dutch Porter stemmer). Patch by Hugo van Kemenade +* #14625: Fix issue that prevented empty TOC entry warnings from being + suppressed. + Patch by Michel Albert + Release 9.1.0 (released Dec 31, 2025) ===================================== diff --git a/sphinx/directives/other.py b/sphinx/directives/other.py index 80bedce43cb..049a81580bb 100644 --- a/sphinx/directives/other.py +++ b/sphinx/directives/other.py @@ -120,6 +120,7 @@ def parse_content(self, toctree: addnodes.toctree) -> None: entry, location=toctree, subtype='empty_glob', + type='toc', ) for docname in doc_names: From 4d7c08d8562cedf6851a1c263ee1798ed1dcd309 Mon Sep 17 00:00:00 2001 From: Michel Albert Date: Thu, 20 Aug 2026 21:33:47 +0200 Subject: [PATCH 2/3] Improve wording about unmatched toctree globs --- CHANGES.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index f62cee342f0..99451f7b597 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -13,8 +13,8 @@ Bugs fixed English stemmer) and Dutch (which uses the Dutch Porter stemmer). Patch by Hugo van Kemenade -* #14625: Fix issue that prevented empty TOC entry warnings from being - suppressed. +* #14625: Allow suppressing warnings for unmatched toctree glob patterns using + `toc.empty_glob`. Patch by Michel Albert From 604aee87b7cd62d0867dcc4cc2d42681c1bc7bf8 Mon Sep 17 00:00:00 2001 From: Michel Albert Date: Fri, 21 Aug 2026 06:38:28 +0200 Subject: [PATCH 3/3] Fix styling issues --- CHANGES.rst | 2 +- sphinx/directives/other.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 99451f7b597..f979b8f8eea 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -14,7 +14,7 @@ Bugs fixed Patch by Hugo van Kemenade * #14625: Allow suppressing warnings for unmatched toctree glob patterns using - `toc.empty_glob`. + ``toc.empty_glob``. Patch by Michel Albert diff --git a/sphinx/directives/other.py b/sphinx/directives/other.py index 049a81580bb..9d50d772e65 100644 --- a/sphinx/directives/other.py +++ b/sphinx/directives/other.py @@ -119,8 +119,8 @@ def parse_content(self, toctree: addnodes.toctree) -> None: __("toctree glob pattern %r didn't match any documents"), entry, location=toctree, - subtype='empty_glob', type='toc', + subtype='empty_glob', ) for docname in doc_names: