From: Stefano Rivera <stefanor@debian.org>
Date: Fri, 5 Nov 2021 17:33:55 -0700
Subject: Local Intersphinx Mapping

Don't hit the Internet for Intersphinx references, we have them in
Debian.

Forwarded: not-needed
---
 docs/conf.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/docs/conf.py b/docs/conf.py
index ddef188..b65f2ee 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -10,7 +10,7 @@
 # All configuration values have a default; values that are commented out
 # serve to show the default.
 
-# import sys
+import sys
 # import os
 
 # If extensions (or modules to document with autodoc) are in another directory,
@@ -281,8 +281,11 @@ linkcheck_ignore = [
 ]
 
 intersphinx_mapping = {
-    "python": ("https://docs.python.org/3", None),
-    "requests": ("https://requests.readthedocs.io/en/latest/", None),
+    "python": ("https://docs.python.org/3",
+               f"/usr/share/doc/python{sys.version_info[0]}."
+               f"{sys.version_info[1]}/html/objects.inv"),
+    "requests": ("https://requests.readthedocs.io/en/latest/",
+                 "/usr/share/doc/python-requests-doc/html/objects.inv"),
 }
 
 # Be strict about the invalid references:
