Skip to content

Commit 8642fdc

Browse files
rffontenellemerwokhugovkAA-Turner
authored
[3.11] GH-103484: Fix broken links reported by linkcheck (GH-103608) (#103683)
Co-authored-by: Éric <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]> Co-authored-by: Adam Turner <[email protected]> Fix broken links reported by linkcheck (#103608)
1 parent 4e9635e commit 8642fdc

File tree

13 files changed

+35
-21
lines changed

13 files changed

+35
-21
lines changed

Doc/conf.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,24 @@
251251
r'https://github.com/python/cpython/tree/.*': 'https://github.com/python/cpython/blob/.*'
252252
}
253253

254+
linkcheck_anchors_ignore = [
255+
# ignore anchors that start with a '/', e.g. Wikipedia media files:
256+
# https://en.wikipedia.org/wiki/Walrus#/media/File:Pacific_Walrus_-_Bull_(8247646168).jpg
257+
r'\/.*',
258+
]
259+
260+
linkcheck_ignore = [
261+
# The crawler gets "Anchor not found"
262+
r'https://developer.apple.com/documentation/.+?#.*',
263+
r'https://devguide.python.org.+?/#.*',
264+
r'https://github.com.+?#.*',
265+
# Robot crawlers not allowed: "403 Client Error: Forbidden"
266+
r'https://support.enthought.com/hc/.*',
267+
# SSLError CertificateError, even though it is valid
268+
r'https://unix.org/version2/whatsnew/lp64_wp.html',
269+
]
270+
271+
254272
# Options for extensions
255273
# ----------------------
256274

Doc/distributing/index.rst

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,10 @@ involved in creating and publishing a project:
130130
* `Uploading the project to the Python Package Index`_
131131
* `The .pypirc file`_
132132

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

142138

143139
How do I...?

Doc/faq/library.rst

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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/whatsnew/2.6.rst

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2103,7 +2103,7 @@ Changes to Python's build process and to the C API include:
21032103

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

Misc/NEWS.d/3.7.0b2.rst

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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)