Skip to content

Commit caed494

Browse files
rffontenellemerwokhugovkAA-Turner
authored
GH-103484: Fix broken links reported by linkcheck (#103608)
* Doc: Fix broken links reported by linkcheck * Apply suggestions from code review - Remove extra diff line in faq/library.rst (merwok) - Use HTTPS to link Unicode 15.0.0 to solve a redirect (hugovk) - Use wayback machine link for openssl 1.1.0 instead of linking 1.1.1, "as this text mentions a feature from 1.1.0" (hugovk) Co-authored-by: Éric <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]> * Doc: Make mark-up code as literal * Doc: Alphabetize items in linkcheck_ignore Co-authored-by: Hugo van Kemenade <[email protected]> * Doc: Improve comment in sphinx conf Co-authored-by: Adam Turner <[email protected]> --------- Co-authored-by: Éric <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]> Co-authored-by: Adam Turner <[email protected]>
1 parent e5eaac6 commit caed494

File tree

15 files changed

+45
-30
lines changed

15 files changed

+45
-30
lines changed

Doc/conf.py

+18
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,24 @@
263263
r'https://github.com/python/cpython/tree/.*': 'https://github.com/python/cpython/blob/.*'
264264
}
265265

266+
linkcheck_anchors_ignore = [
267+
# ignore anchors that start with a '/', e.g. Wikipedia media files:
268+
# https://en.wikipedia.org/wiki/Walrus#/media/File:Pacific_Walrus_-_Bull_(8247646168).jpg
269+
r'\/.*',
270+
]
271+
272+
linkcheck_ignore = [
273+
# The crawler gets "Anchor not found"
274+
r'https://developer.apple.com/documentation/.+?#.*',
275+
r'https://devguide.python.org.+?/#.*',
276+
r'https://github.com.+?#.*',
277+
# Robot crawlers not allowed: "403 Client Error: Forbidden"
278+
r'https://support.enthought.com/hc/.*',
279+
# SSLError CertificateError, even though it is valid
280+
r'https://unix.org/version2/whatsnew/lp64_wp.html',
281+
]
282+
283+
266284
# Options for extensions
267285
# ----------------------
268286

Doc/distributing/index.rst

+4-8
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,10 @@ involved in creating and publishing a project:
129129
* `Uploading the project to the Python Package Index`_
130130
* `The .pypirc file`_
131131

132-
.. _Project structure: \
133-
https://packaging.python.org/tutorials/packaging-projects/#packaging-python-projects
134-
.. _Building and packaging the project: \
135-
https://packaging.python.org/tutorials/packaging-projects/#creating-the-package-files
136-
.. _Uploading the project to the Python Package Index: \
137-
https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives
138-
.. _The .pypirc file: \
139-
https://packaging.python.org/specifications/pypirc/
132+
.. _Project structure: https://packaging.python.org/tutorials/packaging-projects/#packaging-python-projects
133+
.. _Building and packaging the project: https://packaging.python.org/tutorials/packaging-projects/#creating-the-package-files
134+
.. _Uploading the project to the Python Package Index: https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives
135+
.. _The .pypirc file: https://packaging.python.org/specifications/pypirc/
140136

141137

142138
How do I...?

Doc/faq/library.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ socket to :meth:`select.select` to check if it's writable.
780780
The :mod:`asyncio` module provides a general purpose single-threaded and
781781
concurrent asynchronous library, which can be used for writing non-blocking
782782
network code.
783-
The third-party `Twisted <https://twistedmatrix.com/trac/>`_ library is
783+
The third-party `Twisted <https://twisted.org/>`_ library is
784784
a popular and feature-rich alternative.
785785
786786

Doc/howto/functional.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1208,8 +1208,8 @@ General
12081208
-------
12091209

12101210
**Structure and Interpretation of Computer Programs**, by Harold Abelson and
1211-
Gerald Jay Sussman with Julie Sussman. Full text at
1212-
https://mitpress.mit.edu/sicp/. In this classic textbook of computer science,
1211+
Gerald Jay Sussman with Julie Sussman. The book can be found at
1212+
https://mitpress.mit.edu/sicp. In this classic textbook of computer science,
12131213
chapters 2 and 3 discuss the use of sequences and streams to organize the data
12141214
flow inside a program. The book uses Scheme for its examples, but many of the
12151215
design approaches described in these chapters are applicable to functional-style

Doc/howto/urllib2.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ response::
8686

8787
import urllib.request
8888

89-
req = urllib.request.Request('http://www.voidspace.org.uk')
89+
req = urllib.request.Request('http://python.org/')
9090
with urllib.request.urlopen(req) as response:
9191
the_page = response.read()
9292

@@ -458,7 +458,7 @@ To illustrate creating and installing a handler we will use the
458458
``HTTPBasicAuthHandler``. For a more detailed discussion of this subject --
459459
including an explanation of how Basic Authentication works - see the `Basic
460460
Authentication Tutorial
461-
<http://www.voidspace.org.uk/python/articles/authentication.shtml>`_.
461+
<https://web.archive.org/web/20201215133350/http://www.voidspace.org.uk/python/articles/authentication.shtml>`__.
462462

463463
When authentication is required, the server sends a header (as well as the 401
464464
error code) requesting authentication. This specifies the authentication scheme

Doc/library/readline.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function.
1919

2020
Readline keybindings may be configured via an initialization file, typically
2121
``.inputrc`` in your home directory. See `Readline Init File
22-
<https://tiswww.cwru.edu/php/chet/readline/rluserman.html#SEC9>`_
22+
<https://tiswww.cwru.edu/php/chet/readline/rluserman.html#Readline-Init-File>`_
2323
in the GNU Readline manual for information about the format and
2424
allowable constructs of that file, and the capabilities of the
2525
Readline library in general.

Doc/library/stdtypes.rst

+9-8
Original file line numberDiff line numberDiff line change
@@ -1605,8 +1605,8 @@ expression support in the :mod:`re` module).
16051605
converts it to ``"ss"``.
16061606

16071607
The casefolding algorithm is
1608-
`described in section 3.13 of the Unicode Standard
1609-
<http://www.unicode.org/versions/Unicode15.0.0/ch03.pdf#G53253>`__.
1608+
`described in section 3.13 'Default Case Folding' of the Unicode Standard
1609+
<https://www.unicode.org/versions/Unicode15.0.0/ch03.pdf>`__.
16101610

16111611
.. versionadded:: 3.3
16121612

@@ -1768,8 +1768,9 @@ expression support in the :mod:`re` module).
17681768
one character, ``False`` otherwise. Alphabetic characters are those characters defined
17691769
in the Unicode character database as "Letter", i.e., those with general category
17701770
property being one of "Lm", "Lt", "Lu", "Ll", or "Lo". Note that this is different
1771-
from the `Alphabetic property defined in the Unicode Standard
1772-
<https://www.unicode.org/versions/Unicode15.0.0/ch04.pdf#G91002>`_.
1771+
from the `Alphabetic property defined in the section 4.10 'Letters, Alphabetic, and
1772+
Ideographic' of the Unicode Standard
1773+
<https://www.unicode.org/versions/Unicode15.0.0/ch04.pdf>`_.
17731774

17741775

17751776
.. method:: str.isascii()
@@ -1904,8 +1905,8 @@ expression support in the :mod:`re` module).
19041905
lowercase.
19051906

19061907
The lowercasing algorithm used is
1907-
`described in section 3.13 of the Unicode Standard
1908-
<https://www.unicode.org/versions/Unicode15.0.0/ch03.pdf#G34078>`__.
1908+
`described in section 3.13 'Default Case Folding' of the Unicode Standard
1909+
<https://www.unicode.org/versions/Unicode15.0.0/ch03.pdf>`__.
19091910

19101911

19111912
.. method:: str.lstrip([chars])
@@ -2250,8 +2251,8 @@ expression support in the :mod:`re` module).
22502251
titlecase).
22512252

22522253
The uppercasing algorithm used is
2253-
`described in section 3.13 of the Unicode Standard
2254-
<https://www.unicode.org/versions/Unicode15.0.0/ch03.pdf#G34078>`__.
2254+
`described in section 3.13 'Default Case Folding' of the Unicode Standard
2255+
<https://www.unicode.org/versions/Unicode15.0.0/ch03.pdf>`__.
22552256

22562257

22572258
.. method:: str.zfill(width)

Doc/library/zipfile.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
.. moduleauthor:: James C. Ahlstrom <[email protected]>
88
.. sectionauthor:: James C. Ahlstrom <[email protected]>
99

10-
**Source code:** :source:`Lib/zipfile.py`
10+
**Source code:** :source:`Lib/zipfile/`
1111

1212
--------------
1313

Doc/whatsnew/2.6.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ this edition of "What's New in Python" links to the bug/patch
172172
item for each change.
173173

174174
Hosting of the Python bug tracker is kindly provided by
175-
`Upfront Systems <http://www.upfrontsoftware.co.za>`__
175+
`Upfront Systems <https://upfrontsoftware.co.za>`__
176176
of Stellenbosch, South Africa. Martin von Löwis put a
177177
lot of effort into importing existing bugs and patches from
178178
SourceForge; his scripts for this import operation are at

Doc/whatsnew/2.7.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2104,7 +2104,7 @@ Changes to Python's build process and to the C API include:
21042104

21052105
* The latest release of the GNU Debugger, GDB 7, can be `scripted
21062106
using Python
2107-
<https://sourceware.org/gdb/current/onlinedocs/gdb/Python.html>`__.
2107+
<https://web.archive.org/web/20110715084810/http://sourceware.org/gdb/current/onlinedocs/gdb/Python.html>`__.
21082108
When you begin debugging an executable program P, GDB will look for
21092109
a file named ``P-gdb.py`` and automatically read it. Dave Malcolm
21102110
contributed a :file:`python-gdb.py` that adds a number of

Misc/NEWS.d/3.7.0b2.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ Wirtel
357357
358358
Add TLSVersion constants and SSLContext.maximum_version / minimum_version
359359
attributes. The new API wraps OpenSSL 1.1
360-
https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_min_proto_version.html
360+
https://web.archive.org/web/20180309043602/https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_min_proto_version.html
361361
feature.
362362

363363
..

Misc/NEWS.d/3.8.0a1.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5951,7 +5951,7 @@ Wirtel
59515951
59525952
Add TLSVersion constants and SSLContext.maximum_version / minimum_version
59535953
attributes. The new API wraps OpenSSL 1.1
5954-
https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_min_proto_version.html
5954+
https://web.archive.org/web/20180309043602/https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_min_proto_version.html
59555955
feature.
59565956

59575957
..

Misc/NEWS.d/3.9.0a1.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -4887,7 +4887,7 @@ Fix use of registry values to launch Python from Microsoft Store app.
48874887
.. section: Windows
48884888
48894889
Fix memory leak on Windows in creating an SSLContext object or running
4890-
urllib.request.urlopen('https://...').
4890+
``urllib.request.urlopen('https://...')``.
48914891

48924892
..
48934893

Misc/NEWS.d/3.9.0a2.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ added.
686686
687687
Update documentation to state that to activate virtual environments under
688688
fish one should use `source`, not `.` as documented at
689-
https://fishshell.com/docs/current/commands.html#source.
689+
https://fishshell.com/docs/current/cmds/source.html.
690690

691691
..
692692

Misc/NEWS.d/3.9.0a4.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ The distutils ``bdist_msi`` command is deprecated in Python 3.9, use
392392
Improved performance of zipfile.Path for files with a large number of
393393
entries. Also improved performance and fixed minor issue as published with
394394
`importlib_metadata 1.5
395-
<https://importlib-metadata.readthedocs.io/en/latest/changelog%20(links).html#v1-5-0>`_.
395+
<https://importlib-metadata.readthedocs.io/en/latest/history.html#v1-5-0>`_.
396396

397397
..
398398

0 commit comments

Comments
 (0)