From 60f28cc330ccea830140d455e0b74c5d1b91d1e7 Mon Sep 17 00:00:00 2001 From: M Bussonnier Date: Tue, 12 Nov 2024 16:51:04 +0100 Subject: [PATCH] Use intersphinx_registry In particular distributed has moved. --- docs/requirements.txt | 1 + docs/source/conf.py | 18 +++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 42ffcb3b..dcc209e5 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,6 @@ # pin jinja2 due to broken deprecation used in nbconvert autodoc-traits +intersphinx-registry jinja2==3.0.* matplotlib myst-nb diff --git a/docs/source/conf.py b/docs/source/conf.py index a5b6818c..69511e38 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -18,6 +18,8 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. # sys.path.insert(0, os.path.abspath('.')) # We load the ipython release info into a dict by explicit execution +from intersphinx_registry import get_intersphinx_mapping + iprelease = {} exec( compile( @@ -358,13 +360,15 @@ # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = { - 'python': ('https://docs.python.org/3/', None), - 'ipython': ('https://ipython.readthedocs.io/en/stable/', None), - 'pymongo': ('https://pymongo.readthedocs.io/en/stable/', None), - 'distributed': ('https://distributed.readthedocs.io/en/stable/', None), - 'jupyterclient': ('https://jupyter-client.readthedocs.io/en/stable/', None), -} +intersphinx_mapping = get_intersphinx_mapping( + packages={ + 'python', + 'ipython', + 'pymongo', + 'distributed', + 'jupyterclient', + } +) import os