1Sphinx changed something between sphinx=4.5.0 and sphinx=5.3 that broke
2"sphinxcontrib.log_cabinet" plugin.
3
4When Sphinx tries to importlib.import_module("sphinxcontrib.log_cabinet"), it
5has couple other sphinxcontrib.* libraries in sys.path, and they seem to cause
6conflict. So here I purge sys.path from sphixcontrib-related things, import
7log_cabinet and put everything back, so when Sphinx will do "import_module",
8"sphinxcontrib.log_cabinet" will be already imported and cached.
9
10All this is quite hacky, but we are talking about merely building documentation
11here. If resulting html looks good, what happened in Nix sandbox stays in Nix
12sandbox.
13
14--- a/docs/conf.py 1970-01-01 00:00:00.000000000 -0000
15+++ b/docs/conf.py 1970-01-01 00:00:00.000000000 -0000
16@@ -1,5 +1,12 @@
17 from pallets_sphinx_themes import get_version
18 from pallets_sphinx_themes import ProjectLink
19+import importlib
20+import sys
21+
22+saved_path = sys.path
23+sys.path = [x for x in sys.path if "sphinxcontrib" not in x or "cabinet" in x]
24+import sphinxcontrib.log_cabinet
25+sys.path = saved_path
26
27 # Project --------------------------------------------------------------