Skip to content

Commit 798cfb2

Browse files
ncoghlanMariatta
authored andcommitted
bpo-30052: Always regenerate cross-references (GH-1339) (GH-1921)
The patch for bpo-30052 changed the preferred link target for :func:`bytes` and :func`bytearray` references to be the respective type definitions rather than the corresponding builtin function entries. This patch changes the daily documentation builds to disable the output caching in Sphinx, in order to ensure that cross-reference changes like this one are reliably picked up and applied automatically after merging. (cherry picked from commit 7a82f9c)
1 parent d125738 commit 798cfb2

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

Doc/Makefile

+7-2
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,20 @@ serve:
159159
../Tools/scripts/serve.py build/html
160160

161161
# Targets for daily automated doc build
162+
# By default, Sphinx only rebuilds pages where the page content has changed.
163+
# This means it doesn't always pick up changes to preferred link targets, etc
164+
# To ensure such changes are picked up, we build the published docs with
165+
# `-E` (to ignore the cached environment) and `-a` (to ignore already existing
166+
# output files)
162167

163168
# for development releases: always build
164169
autobuild-dev:
165-
make dist SPHINXOPTS='$(SPHINXOPTS) -A daily=1 -A versionswitcher=1'
170+
make dist SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1 -A versionswitcher=1'
166171
-make suspicious
167172

168173
# for quick rebuilds (HTML only)
169174
autobuild-dev-html:
170-
make html SPHINXOPTS='$(SPHINXOPTS) -A daily=1 -A versionswitcher=1'
175+
make html SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1 -A versionswitcher=1'
171176

172177
# for stable releases: only build if not in pre-release stage (alpha, beta)
173178
# release candidate downloads are okay, since the stable tree can be in that stage

Misc/NEWS

+9
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,15 @@ Build
192192
Documentation
193193
-------------
194194

195+
- Issue #30052: the link targets for :func:`bytes` and
196+
:func:`bytearray` are now their respective type definitions, rather
197+
than the corresponding builtin function entries. Use :ref:`bytes <func-bytes>`
198+
and :ref:`bytearray <func-bytearray>` to reference the latter.
199+
200+
In order to ensure this and future cross-reference updates are applied
201+
automatically, the daily documentation builds now disable the default
202+
output caching features in Sphinx.
203+
195204
- bpo-26985: Add missing info of code object in inspect documentation.
196205

197206
Tools/Demos

0 commit comments

Comments
 (0)