Skip to content

Commit 89afe3e

Browse files
[3.15] Docs(build): linklint is now called sphinx_linklint (GH-156373) (#156429)
(cherry picked from commit 98bd716) Co-authored-by: Stan Ulbrych <stan@python.org>
1 parent b18a8b6 commit 89afe3e

4 files changed

Lines changed: 24 additions & 11 deletions

File tree

Doc/Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ help:
3232
@echo "Please use \`make <target>' where <target> is one of"
3333
@echo " clean to remove build files"
3434
@echo " venv to create a venv with necessary tools"
35+
@echo " lock to regenerate the pinned dependencies in $(REQUIREMENTS)"
3536
@echo " html to make standalone HTML files"
3637
@echo " gettext to generate POT files"
3738
@echo " htmlview to open the index page built by the html target in your browser"
@@ -185,6 +186,19 @@ venv:
185186
echo "The venv has been created in the $(VENVDIR) directory"; \
186187
fi
187188

189+
.PHONY: lock
190+
lock:
191+
# Dependencies have a 14 day cooldown period to mitigate supply chain attacks,
192+
# except for sphinx_linklint and python-docs-theme, which are maintained by
193+
# core team members.
194+
uv pip compile requirements.txt \
195+
--exclude-newer P14D \
196+
--exclude-newer-package sphinx_linklint=PT0S \
197+
--exclude-newer-package python-docs-theme=PT0S \
198+
--no-cache --output-file $(REQUIREMENTS) \
199+
--python-version 3.12 --universal \
200+
--custom-compile-command="make lock"
201+
188202
.PHONY: dist-no-html
189203
dist-no-html: dist-text dist-epub dist-texinfo
190204

Doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
# Skip if downstream redistributors haven't installed them
4343
_OPTIONAL_EXTENSIONS = (
44-
'linklint.ext',
44+
'sphinx_linklint.ext',
4545
'notfound.extension',
4646
'sphinxext.opengraph',
4747
'sphinxcontrib.rsvgconverter',

Doc/pylock.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file was autogenerated by uv via the following command:
2-
# uv pip compile Doc/requirements.txt --exclude-newer P14D --exclude-newer-package linklint=PT0S --exclude-newer-package python-docs-theme=PT0S --no-cache --output-file Doc/pylock.toml --python-version 3.12 --universal
2+
# make lock
33
lock-version = "1.0"
44
created-by = "uv"
55
requires-python = ">=3.12"
@@ -131,12 +131,6 @@ version = "3.1.6"
131131
sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", upload-time = 2025-03-05T20:05:02Z, size = 245115, hashes = { sha256 = "0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" } }
132132
wheels = [{ url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", upload-time = 2025-03-05T20:05:00Z, size = 134899, hashes = { sha256 = "85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67" } }]
133133

134-
[[packages]]
135-
name = "linklint"
136-
version = "1.0.1"
137-
sdist = { url = "https://files.pythonhosted.org/packages/62/22/c65a97b2192c3c317c472058bf52d7ca88e421998fa8d5c183b2280ab5d4/linklint-1.0.1.tar.gz", upload-time = 2026-06-09T12:30:47Z, size = 22412, hashes = { sha256 = "10201b4366edecfbeb3281883aff857dbe77d40bb56f16f212d372f597342d5f" } }
138-
wheels = [{ url = "https://files.pythonhosted.org/packages/7b/d8/b2f1708f55f4dd5358b48d28be07ff8e0dadd6d23e41ead2ed1424e90256/linklint-1.0.1-py3-none-any.whl", upload-time = 2026-06-09T12:30:46Z, size = 12828, hashes = { sha256 = "c931f110482f1d17808aa2df78b116adc44d7a14e9e79922c57bf9a7cba40a2d" } }]
139-
140134
[[packages]]
141135
name = "markupsafe"
142136
version = "2.1.5"
@@ -201,6 +195,12 @@ version = "8.2.3"
201195
sdist = { url = "https://files.pythonhosted.org/packages/38/ad/4360e50ed56cb483667b8e6dadf2d3fda62359593faabbe749a27c4eaca6/sphinx-8.2.3.tar.gz", upload-time = 2025-03-02T22:31:59Z, size = 8321876, hashes = { sha256 = "398ad29dee7f63a75888314e9424d40f52ce5a6a87ae88e7071e80af296ec348" } }
202196
wheels = [{ url = "https://files.pythonhosted.org/packages/31/53/136e9eca6e0b9dc0e1962e2c908fbea2e5ac000c2a2fbd9a35797958c48b/sphinx-8.2.3-py3-none-any.whl", upload-time = 2025-03-02T22:31:56Z, size = 3589741, hashes = { sha256 = "4405915165f13521d875a8c29c8970800a0141c14cc5416a38feca4ea5d9b9c3" } }]
203197

198+
[[packages]]
199+
name = "sphinx-linklint"
200+
version = "2.0.0"
201+
sdist = { url = "https://files.pythonhosted.org/packages/f6/99/f9947b30fd11e782855a13de1aac7d08634edba1c193a0ee01bf5338531c/sphinx_linklint-2.0.0.tar.gz", upload-time = 2026-08-25T12:47:33Z, size = 23297, hashes = { sha256 = "e7ea4d3b1bd83665e9c2ab9fd92c6c645c805956d2e8ca6b0f528f3a9638910d" } }
202+
wheels = [{ url = "https://files.pythonhosted.org/packages/d7/3d/6b96af48e139357e1e041a710d943c4bb79ad149c7aab074df784b4395ec/sphinx_linklint-2.0.0-py3-none-any.whl", upload-time = 2026-08-25T12:47:32Z, size = 13390, hashes = { sha256 = "12aa64f3b3faaa6e8a979a7d1f2c38617866652b670e3d19fa0f60a6ce3657ef" } }]
203+
204204
[[packages]]
205205
name = "sphinx-notfound-page"
206206
version = "1.0.4"

Doc/requirements.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ pygments @ https://github.com/pygments/pygments/archive/2cad2642058441b59782a6a1
1515

1616
blurb
1717

18-
sphinxext-opengraph~=0.13.0
18+
sphinx-linklint
1919
sphinx-notfound-page~=1.0.0
20+
sphinxext-opengraph~=0.13.0
2021

2122
# The theme used by the documentation is stored separately, so we need
2223
# to install that as well.
2324
python-docs-theme>=2023.3.1,!=2023.7
2425

25-
linklint
26-
2726
-c constraints.txt

0 commit comments

Comments
 (0)