From 8c8d7d2b8bde64da5e22c89e58ee481e66986c08 Mon Sep 17 00:00:00 2001 From: M Bussonnier Date: Fri, 8 Nov 2024 03:13:07 -0800 Subject: [PATCH] Rely on intrsphinx_registry to keep intersphinx up to date. (#1290) --- docs/conf.py | 10 +++++----- pyproject.toml | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 38a724b5..5a5f8ed5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,6 +15,8 @@ from pathlib import Path from typing import Any +from intersphinx_registry import get_intersphinx_mapping + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. @@ -303,11 +305,9 @@ # 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/latest", None), - "jupyter": ("https://jupyter.readthedocs.io/en/latest", None), -} + + +intersphinx_mapping = get_intersphinx_mapping(packages={"ipython", "python", "jupyter"}) def setup(app): diff --git a/pyproject.toml b/pyproject.toml index e1d7b1d5..675d9d87 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,6 +51,7 @@ docs = [ "sphinxcontrib_github_alt", "sphinxcontrib-spelling", "sphinx-autodoc-typehints", + "intersphinx_registry", "trio" ] test = [