File 12885.patch of Package python-Sphinx

From e518a7b749d878dc9845d4c218c9f9fbd7df308f Mon Sep 17 00:00:00 2001
From: James Addison <jay@jp-hosting.net>
Date: Thu, 12 Sep 2024 00:24:19 +0100
Subject: [PATCH] ToCTree env collector: disable read-parallelism

Bugreports #6714 and #12409 indicate that the table-of-contents
collection process is not currently implemented in a way that
guarantees deterministic resolution in the presence of parallelism.

Until such time as we can implement that, disable parallel reads
for the `TocTreeCollector` so that the tree is resolved serially.
 CHANGES.rst                              | 3 +++
 sphinx/environment/collectors/toctree.py | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

---

diff --git a/sphinx/environment/collectors/toctree.py b/sphinx/environment/collectors/toctree.py
index e3f80f25155..9b707493d4a 100644
--- a/sphinx/environment/collectors/toctree.py
+++ b/sphinx/environment/collectors/toctree.py
@@ -364,6 +364,6 @@ def setup(app: Sphinx) -> ExtensionMetadata:
 
     return {
         'version': 'builtin',
-        'parallel_read_safe': True,
+        'parallel_read_safe': False,
         'parallel_write_safe': True,
     }
openSUSE Build Service is sponsored by