]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] GH-103484: Fix broken links reported by linkcheck (GH-103608) (#103683)
authorRafael Fontenelle <rffontenelle@users.noreply.github.com>
Sun, 23 Apr 2023 20:26:15 +0000 (17:26 -0300)
committerGitHub <noreply@github.com>
Sun, 23 Apr 2023 20:26:15 +0000 (23:26 +0300)
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Fix broken links reported by linkcheck (#103608)

13 files changed:
Doc/conf.py
Doc/distributing/index.rst
Doc/faq/library.rst
Doc/howto/functional.rst
Doc/howto/urllib2.rst
Doc/library/readline.rst
Doc/whatsnew/2.6.rst
Doc/whatsnew/2.7.rst
Misc/NEWS.d/3.7.0b2.rst
Misc/NEWS.d/3.8.0a1.rst
Misc/NEWS.d/3.9.0a1.rst
Misc/NEWS.d/3.9.0a2.rst
Misc/NEWS.d/3.9.0a4.rst

index d89470973dacad0f46a61afe77a06429d65a2114..851b473108d15c54eb955f364a12c1140c2fc61a 100644 (file)
@@ -251,6 +251,24 @@ linkcheck_allowed_redirects = {
     r'https://github.com/python/cpython/tree/.*': 'https://github.com/python/cpython/blob/.*'
 }
 
+linkcheck_anchors_ignore = [
+    # ignore anchors that start with a '/', e.g. Wikipedia media files:
+    # https://en.wikipedia.org/wiki/Walrus#/media/File:Pacific_Walrus_-_Bull_(8247646168).jpg
+    r'\/.*',
+]
+
+linkcheck_ignore = [
+    # The crawler gets "Anchor not found"
+    r'https://developer.apple.com/documentation/.+?#.*',
+    r'https://devguide.python.org.+?/#.*',
+    r'https://github.com.+?#.*',
+    # Robot crawlers not allowed: "403 Client Error: Forbidden"
+    r'https://support.enthought.com/hc/.*',
+    # SSLError CertificateError, even though it is valid
+    r'https://unix.org/version2/whatsnew/lp64_wp.html',
+]
+
+
 # Options for extensions
 # ----------------------
 
index 136cf4e77b15430505eb3a0c396d6e4ac17f18c1..8e70c24e70266dc74b21f630c6e5e329f11ff389 100644 (file)
@@ -130,14 +130,10 @@ involved in creating and publishing a project:
 * `Uploading the project to the Python Package Index`_
 * `The .pypirc file`_
 
-.. _Project structure: \
-    https://packaging.python.org/tutorials/packaging-projects/#packaging-python-projects
-.. _Building and packaging the project: \
-   https://packaging.python.org/tutorials/packaging-projects/#creating-the-package-files
-.. _Uploading the project to the Python Package Index: \
-   https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives
-.. _The .pypirc file: \
-   https://packaging.python.org/specifications/pypirc/
+.. _Project structure: https://packaging.python.org/tutorials/packaging-projects/#packaging-python-projects
+.. _Building and packaging the project: https://packaging.python.org/tutorials/packaging-projects/#creating-the-package-files
+.. _Uploading the project to the Python Package Index: https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives
+.. _The .pypirc file: https://packaging.python.org/specifications/pypirc/
 
 
 How do I...?
index a9cde456575020f489c69282f0b7048e669349a3..597caaa778e1c820e8991f4fff78d9730446ccd8 100644 (file)
@@ -780,7 +780,7 @@ socket to :meth:`select.select` to check if it's writable.
    The :mod:`asyncio` module provides a general purpose single-threaded and
    concurrent asynchronous library, which can be used for writing non-blocking
    network code.
-   The third-party `Twisted <https://twistedmatrix.com/trac/>`_ library is
+   The third-party `Twisted <https://twisted.org/>`_ library is
    a popular and feature-rich alternative.
 
 
index e68bc2ebb1cc82c02169302db3b8e6f50c800cd5..64f2293b21e2ee5ad3c0c0c80ca487b4d7ed9ed7 100644 (file)
@@ -1208,8 +1208,8 @@ General
 -------
 
 **Structure and Interpretation of Computer Programs**, by Harold Abelson and
-Gerald Jay Sussman with Julie Sussman.  Full text at
-https://mitpress.mit.edu/sicp/.  In this classic textbook of computer science,
+Gerald Jay Sussman with Julie Sussman.  The book can be found at
+https://mitpress.mit.edu/sicp.  In this classic textbook of computer science,
 chapters 2 and 3 discuss the use of sequences and streams to organize the data
 flow inside a program.  The book uses Scheme for its examples, but many of the
 design approaches described in these chapters are applicable to functional-style
index 69af3c3a85c5d6cd87fd7ce5e804562969fa7141..61ba6bd7224fcce9b90f8e944a4c088ec122b977 100644 (file)
@@ -86,7 +86,7 @@ response::
 
     import urllib.request
 
-    req = urllib.request.Request('http://www.voidspace.org.uk')
+    req = urllib.request.Request('http://python.org/')
     with urllib.request.urlopen(req) as response:
        the_page = response.read()
 
@@ -458,7 +458,7 @@ To illustrate creating and installing a handler we will use the
 ``HTTPBasicAuthHandler``. For a more detailed discussion of this subject --
 including an explanation of how Basic Authentication works - see the `Basic
 Authentication Tutorial
-<http://www.voidspace.org.uk/python/articles/authentication.shtml>`_.
+<https://web.archive.org/web/20201215133350/http://www.voidspace.org.uk/python/articles/authentication.shtml>`__.
 
 When authentication is required, the server sends a header (as well as the 401
 error code) requesting authentication.  This specifies the authentication scheme
index 4d485d25b5402091c668b883eb7ec7807c7c7b20..8fb0eca8df74d89ba161036eb4bbd84b08719a56 100644 (file)
@@ -19,7 +19,7 @@ function.
 
 Readline keybindings may be configured via an initialization file, typically
 ``.inputrc`` in your home directory.  See `Readline Init File
-<https://tiswww.cwru.edu/php/chet/readline/rluserman.html#SEC9>`_
+<https://tiswww.cwru.edu/php/chet/readline/rluserman.html#Readline-Init-File>`_
 in the GNU Readline manual for information about the format and
 allowable constructs of that file, and the capabilities of the
 Readline library in general.
index 34f2656f765c7df4473c11ae816d1de4eb5599c6..4ee2aacb108a36c35a74dd4c4fd79e0b67e54621 100644 (file)
@@ -172,7 +172,7 @@ this edition of "What's New in Python" links to the bug/patch
 item for each change.
 
 Hosting of the Python bug tracker is kindly provided by
-`Upfront Systems <http://www.upfrontsoftware.co.za>`__
+`Upfront Systems <https://upfrontsoftware.co.za>`__
 of Stellenbosch, South Africa.  Martin von Löwis put a
 lot of effort into importing existing bugs and patches from
 SourceForge; his scripts for this import operation are at
index 82f5ea3b31275b3a6f2b477db692408503576543..1acb09cf925716a624cd0a6d07ff53332023d1cf 100644 (file)
@@ -2103,7 +2103,7 @@ Changes to Python's build process and to the C API include:
 
 * The latest release of the GNU Debugger, GDB 7, can be `scripted
   using Python
-  <https://sourceware.org/gdb/current/onlinedocs/gdb/Python.html>`__.
+  <https://web.archive.org/web/20110715084810/http://sourceware.org/gdb/current/onlinedocs/gdb/Python.html>`__.
   When you begin debugging an executable program P, GDB will look for
   a file named ``P-gdb.py`` and automatically read it.  Dave Malcolm
   contributed a :file:`python-gdb.py` that adds a number of
index b2ade206bd5f970f3c6450e2d42612bfc51aa3ee..9590914599bb86dac56a2386893215cfde37bfc4 100644 (file)
@@ -357,7 +357,7 @@ Wirtel
 
 Add TLSVersion constants and SSLContext.maximum_version / minimum_version
 attributes. The new API wraps OpenSSL 1.1
-https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_min_proto_version.html
+https://web.archive.org/web/20180309043602/https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_min_proto_version.html
 feature.
 
 ..
index d95055a59da3282aa8917a0ef3886ffec856d862..c9ca4b8404e67f14e7582b2341eb3409e0688ca0 100644 (file)
@@ -5951,7 +5951,7 @@ Wirtel
 
 Add TLSVersion constants and SSLContext.maximum_version / minimum_version
 attributes. The new API wraps OpenSSL 1.1
-https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_min_proto_version.html
+https://web.archive.org/web/20180309043602/https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_min_proto_version.html
 feature.
 
 ..
index 63d77fd3ac0c3ddf897136469687318e02860dac..2525696c58a4d155f3cb4555e83c82107b8e7a3d 100644 (file)
@@ -4887,7 +4887,7 @@ Fix use of registry values to launch Python from Microsoft Store app.
 .. section: Windows
 
 Fix memory leak on Windows in creating an SSLContext object or running
-urllib.request.urlopen('https://...').
+``urllib.request.urlopen('https://...')``.
 
 ..
 
index 226ea0d3df2243627de89faf6526ebc4ec61b3a3..a03eb10f1d523affe2c32259077f62b9138f375a 100644 (file)
@@ -686,7 +686,7 @@ added.
 
 Update documentation to state that to activate virtual environments under
 fish one should use `source`, not `.` as documented at
-https://fishshell.com/docs/current/commands.html#source.
+https://fishshell.com/docs/current/cmds/source.html.
 
 ..
 
index 2aef8b26b01696d557fda9850bacf8b0e09a52ee..019b34c4082d10a3babbf3bc920dd06dcdbf2314 100644 (file)
@@ -392,7 +392,7 @@ The distutils ``bdist_msi`` command is deprecated in Python 3.9, use
 Improved performance of zipfile.Path for files with a large number of
 entries. Also improved performance and fixed minor issue as published with
 `importlib_metadata 1.5
-<https://importlib-metadata.readthedocs.io/en/latest/changelog%20(links).html#v1-5-0>`_.
+<https://importlib-metadata.readthedocs.io/en/latest/history.html#v1-5-0>`_.
 
 ..