From 7cd3485d141e228603cbfaa4cdb93ef1453c8121 Mon Sep 17 00:00:00 2001 From: Yannick DAYER Date: Wed, 7 Aug 2024 19:23:01 +0200 Subject: [PATCH] fix(catalog): remove an extra / added in the URLs. The URLs passed to sphinx contained an additional `/` character. sphinx>=8.0 does not "resolve" URLs anymore and does not clean it. This removed the superfluous `/`. --- src/auto_intersphinx/catalog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/auto_intersphinx/catalog.py b/src/auto_intersphinx/catalog.py index c1f8f67..934cdaa 100644 --- a/src/auto_intersphinx/catalog.py +++ b/src/auto_intersphinx/catalog.py @@ -109,7 +109,7 @@ def docurls_from_environment(package: str) -> dict[str, str]: headers={"Accept-Encoding": ""}, # Fixes issue on some links ) addr = _ensure_webdir(redirected.url) - if requests.head(addr + "/objects.inv").ok: + if requests.head(addr + "objects.inv").ok: try: return {md["version"]: addr} except KeyError: @@ -208,7 +208,7 @@ def docurls_from_pypi(package: str, max_entries: int) -> dict[str, str]: headers={"Accept-Encoding": ""}, # Fixes issue on some links ) addr = _ensure_webdir(redirected.url) - if requests.head(addr + "/objects.inv").ok: + if requests.head(addr + "objects.inv").ok: versions[data["info"]["version"]] = addr # download further versions, if requested by user @@ -231,7 +231,7 @@ def docurls_from_pypi(package: str, max_entries: int) -> dict[str, str]: addr = urls.get("Documentation") or urls.get("documentation") if addr is not None: addr = _ensure_webdir(addr) - if requests.head(addr + "/objects.inv").ok: + if requests.head(addr + "objects.inv").ok: versions[data["info"]["version"]] = addr return versions