From 2c3ad4fca2cc75e329b0f3d13fb979ffe62614c1 Mon Sep 17 00:00:00 2001
From: Rahix <rahix@rahix.de>
Date: Sun, 19 Sep 2021 15:57:29 +0200
Subject: [PATCH] fix(docs): Fix issue_8945 hack for Sphinx 4.0

---
 Documentation/conf.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/conf.py b/Documentation/conf.py
index 94867ea8b..b21f01dbc 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -167,7 +167,10 @@ def fix_issue_8945():
         "_Complex",
         "complex",
     ]:
-        c_domain._keywords.remove(kw)
+        if kw in c_domain._keywords:
+            c_domain._keywords.remove(kw)
+        if hasattr(c_domain, "_macroKeywords") and kw in c_domain._macroKeywords:
+            c_domain._macroKeywords.remove(kw)
 
     def parse_xref_object(self):
         name = self._parse_nested_name()
-- 
GitLab