]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-103484: Fix permanently redirects reported by linkcheck (GH-124144)
authorRafael Fontenelle <rffontenelle@users.noreply.github.com>
Tue, 17 Sep 2024 02:53:38 +0000 (23:53 -0300)
committerGitHub <noreply@github.com>
Tue, 17 Sep 2024 02:53:38 +0000 (02:53 +0000)
Fix redirects reported by linkcheck, update docs conf.py checks.

17 files changed:
Doc/conf.py
Doc/faq/design.rst
Doc/library/hashlib.rst
Doc/library/http.cookiejar.rst
Doc/library/json.rst
Doc/library/ssl.rst
Doc/library/tkinter.rst
Doc/library/typing.rst
Doc/library/xmlrpc.client.rst
Doc/reference/introduction.rst
Doc/using/mac.rst
Doc/using/windows.rst
Doc/whatsnew/2.4.rst
Doc/whatsnew/2.7.rst
Doc/whatsnew/3.12.rst
Misc/NEWS.d/3.10.0a7.rst
Misc/NEWS.d/3.12.0a6.rst

index 92cc9387abae31cde89898d70e95fa81fbe6a0f6..9f860363eabd09c50952d959be1759faf56b2738 100644 (file)
@@ -553,6 +553,10 @@ linkcheck_allowed_redirects = {
     # Language redirects
     r'https://toml.io': 'https://toml.io/en/',
     r'https://www.redhat.com': 'https://www.redhat.com/en',
+    # pypi.org project name normalization (upper to lowercase, underscore to hyphen)
+    r'https://pypi.org/project/[A-Za-z\d_\-\.]+/': r'https://pypi.org/project/[a-z\d\-\.]+/',
+    # Discourse title name expansion (text changes when title is edited)
+    r'https://discuss\.python\.org/t/\d+': r'https://discuss\.python\.org/t/.*/\d+',
     # Other redirects
     r'https://www.boost.org/libs/.+': r'https://www.boost.org/doc/libs/\d_\d+_\d/.+',
     r'https://support.microsoft.com/en-us/help/\d+': 'https://support.microsoft.com/en-us/topic/.+',
index ebb6d5ed1288c6bd924322ba31bb2202466d0a26..e2710fab9cf800205f51229b4f1accac667550ac 100644 (file)
@@ -328,7 +328,7 @@ Can Python be compiled to machine code, C or some other language?
 -----------------------------------------------------------------
 
 `Cython <https://cython.org/>`_ compiles a modified version of Python with
-optional annotations into C extensions.  `Nuitka <https://www.nuitka.net/>`_ is
+optional annotations into C extensions.  `Nuitka <https://nuitka.net/>`_ is
 an up-and-coming compiler of Python into C++ code, aiming to support the full
 Python language.
 
@@ -345,7 +345,7 @@ to perform a garbage collection, obtain debugging statistics, and tune the
 collector's parameters.
 
 Other implementations (such as `Jython <https://www.jython.org>`_ or
-`PyPy <https://www.pypy.org>`_), however, can rely on a different mechanism
+`PyPy <https://pypy.org>`_), however, can rely on a different mechanism
 such as a full-blown garbage collector.  This difference can cause some
 subtle porting problems if your Python code depends on the behavior of the
 reference counting implementation.
index 5d24b77e13bfcedb6e016c44fd00da44e421c965..dffb167c74771feb55a147bd903121b636a20a17 100644 (file)
@@ -655,7 +655,7 @@ on the hash function used in digital signatures.
     by the signer.
 
     (`NIST SP-800-106 "Randomized Hashing for Digital Signatures"
-    <https://csrc.nist.gov/publications/detail/sp/800-106/archive/2009-02-25>`_)
+    <https://csrc.nist.gov/pubs/sp/800/106/final>`_)
 
 In BLAKE2 the salt is processed as a one-time input to the hash function during
 initialization, rather than as an input to each compression function.
@@ -809,8 +809,8 @@ Domain Dedication 1.0 Universal:
 .. _NIST-SP-800-132: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf
 .. _stackexchange pbkdf2 iterations question: https://security.stackexchange.com/questions/3959/recommended-of-iterations-when-using-pbkdf2-sha256/
 .. _Attacks on cryptographic hash algorithms: https://en.wikipedia.org/wiki/Cryptographic_hash_function#Attacks_on_cryptographic_hash_algorithms
-.. _the FIPS 180-4 standard: https://csrc.nist.gov/publications/detail/fips/180/4/final
-.. _the FIPS 202 standard: https://csrc.nist.gov/publications/detail/fips/202/final
+.. _the FIPS 180-4 standard: https://csrc.nist.gov/pubs/fips/180-4/upd1/final
+.. _the FIPS 202 standard: https://csrc.nist.gov/pubs/fips/202/final
 .. _HACL\* project: https://github.com/hacl-star/hacl-star
 
 
@@ -827,7 +827,7 @@ Domain Dedication 1.0 Universal:
    https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.180-4.pdf
       The FIPS 180-4 publication on Secure Hash Algorithms.
 
-   https://csrc.nist.gov/publications/detail/fips/202/final
+   https://csrc.nist.gov/pubs/fips/202/final
       The FIPS 202 publication on the SHA-3 Standard.
 
    https://www.blake2.net/
index 31ac8bafb6ab4b4234de5b9c353228cac1a29f11..23ddecf873876d49c60334e0de241976ebfcd199 100644 (file)
@@ -137,7 +137,7 @@ The following classes are provided:
       The Netscape protocol with the bugs fixed.  Uses :mailheader:`Set-Cookie2` in
       place of :mailheader:`Set-Cookie`.  Not widely used.
 
-   http://kristol.org/cookie/errata.html
+   https://kristol.org/cookie/errata.html
       Unfinished errata to :rfc:`2965`.
 
    :rfc:`2964` - Use of HTTP State Management
index f0c37948ff8d9a3602a0156f4d9ef490f1c9e269..758d47462b6e12fd4c141fdcee64656575e454ea 100644 (file)
@@ -13,7 +13,7 @@
 
 `JSON (JavaScript Object Notation) <https://json.org>`_, specified by
 :rfc:`7159` (which obsoletes :rfc:`4627`) and by
-`ECMA-404 <https://www.ecma-international.org/publications-and-standards/standards/ecma-404/>`_,
+`ECMA-404 <https://ecma-international.org/publications-and-standards/standards/ecma-404/>`_,
 is a lightweight data interchange format inspired by
 `JavaScript <https://en.wikipedia.org/wiki/JavaScript>`_ object literal syntax
 (although it is not a strict subset of JavaScript [#rfc-errata]_ ).
@@ -557,7 +557,7 @@ Standard Compliance and Interoperability
 ----------------------------------------
 
 The JSON format is specified by :rfc:`7159` and by
-`ECMA-404 <https://www.ecma-international.org/publications-and-standards/standards/ecma-404/>`_.
+`ECMA-404 <https://ecma-international.org/publications-and-standards/standards/ecma-404/>`_.
 This section details this module's level of compliance with the RFC.
 For simplicity, :class:`JSONEncoder` and :class:`JSONDecoder` subclasses, and
 parameters other than those explicitly mentioned, are not considered.
index 7e14fc8c4d3b15fe91766e2a5d0b4219c125bc21..64ff9a4ea5d61ff9fab1b63849bf439c17edf27a 100644 (file)
@@ -1566,7 +1566,7 @@ to speed up repeated connections from the same clients.
    The *capath* string, if present, is
    the path to a directory containing several CA certificates in PEM format,
    following an `OpenSSL specific layout
-   <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_load_verify_locations.html>`_.
+   <https://docs.openssl.org/master/man3/SSL_CTX_load_verify_locations/>`_.
 
    The *cadata* object, if present, is either an ASCII string of one or more
    PEM-encoded certificates or a :term:`bytes-like object` of DER-encoded
@@ -1641,7 +1641,7 @@ to speed up repeated connections from the same clients.
 
    Set the available ciphers for sockets created with this context.
    It should be a string in the `OpenSSL cipher list format
-   <https://www.openssl.org/docs/manmaster/man1/ciphers.html>`_.
+   <https://docs.openssl.org/master/man1/ciphers/>`_.
    If no cipher can be selected (because compile-time options or other
    configuration forbids use of all the specified ciphers), an
    :class:`SSLError` will be raised.
@@ -1874,7 +1874,7 @@ to speed up repeated connections from the same clients.
 .. method:: SSLContext.session_stats()
 
    Get statistics about the SSL sessions created or managed by this context.
-   A dictionary is returned which maps the names of each `piece of information <https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_sess_number.html>`_ to their
+   A dictionary is returned which maps the names of each `piece of information <https://docs.openssl.org/1.1.1/man3/SSL_CTX_sess_number/>`_ to their
    numeric values.  For example, here is the total number of hits and misses
    in the session cache since the context was created::
 
@@ -2017,7 +2017,7 @@ to speed up repeated connections from the same clients.
 .. attribute:: SSLContext.security_level
 
    An integer representing the `security level
-   <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_security_level.html>`_
+   <https://docs.openssl.org/master/man3/SSL_CTX_get_security_level/>`_
    for the context. This attribute is read-only.
 
    .. versionadded:: 3.10
index 70d4b30e96fe3af5487da78b57dfa5d7d99885fe..f284988daf2d4e3811a1a9a5dcdecadeeab603dc 100644 (file)
@@ -58,7 +58,7 @@ details that are unchanged.
    * `Modern Tkinter for Busy Python Developers <https://tkdocs.com/book.html>`_
       By Mark Roseman. (ISBN 978-1999149567)
 
-   * `Python GUI programming with Tkinter <https://www.packtpub.com/product/python-gui-programming-with-tkinter/9781788835886>`_
+   * `Python GUI programming with Tkinter <https://www.packtpub.com/en-us/product/python-gui-programming-with-tkinter-9781788835886>`_
       By Alan D. Moore. (ISBN 978-1788835886)
 
    * `Programming Python <https://learning-python.com/about-pp4e.html>`_
index fa7932061645a4351a5c20566b9c231a465b5033..075c58d65ce2b4e916a6b1d2550ceb6d15f8b50f 100644 (file)
@@ -2866,7 +2866,7 @@ Functions and decorators
 
    .. seealso::
       `Unreachable Code and Exhaustiveness Checking
-      <https://typing.readthedocs.io/en/latest/source/unreachable.html>`__ has more
+      <https://typing.readthedocs.io/en/latest/guides/unreachable.html>`__ has more
       information about exhaustiveness checking with static typing.
 
    .. versionadded:: 3.11
index 614fb19d1f56b6ec74bf7ea7e92ea3e69aa2d88a..c57f433e6efd98dc76fc9964d5066bcb88ab6d0a 100644 (file)
@@ -165,7 +165,7 @@ between conformable Python objects and XML on the wire.
       A good description of XML-RPC operation and client software in several languages.
       Contains pretty much everything an XML-RPC client developer needs to know.
 
-   `XML-RPC Introspection <https://xmlrpc-c.sourceforge.net/introspection.html>`_
+   `XML-RPC Introspection <https://xmlrpc-c.sourceforge.io/introspection.html>`_
       Describes the XML-RPC protocol extension for introspection.
 
    `XML-RPC Specification <http://xmlrpc.scripting.com/spec.html>`_
index cf186705e6e987b6a733c3dc90c6c32b2d10fab1..b7b70e6be5a5b7ba6e65205e5fcd1567fdaa4c3c 100644 (file)
@@ -74,7 +74,7 @@ PyPy
    and a Just in Time compiler. One of the goals of the project is to encourage
    experimentation with the language itself by making it easier to modify the
    interpreter (since it is written in Python).  Additional information is
-   available on `the PyPy project's home page <https://www.pypy.org/>`_.
+   available on `the PyPy project's home page <https://pypy.org/>`_.
 
 Each of these implementations varies in some way from the language as documented
 in this manual, or introduces specific information beyond what's covered in the
index 44fb00de3733c54152243abc42576f537acefe2f..2dfac0758435d15ec5f5749f3301fc1914c991b9 100644 (file)
@@ -155,7 +155,7 @@ https://www.activestate.com; it can also be built from source.
 A number of alternative macOS GUI toolkits are available:
 
 * `PySide <https://www.qt.io/qt-for-python>`__: Official Python bindings to the
-  `Qt GUI toolkit <https://qt.io>`__.
+  `Qt GUI toolkit <https://www.qt.io>`__.
 
 * `PyQt <https://riverbankcomputing.com/software/pyqt/intro>`__: Alternative
   Python bindings to Qt.
index ef98d32e8674ec8dd417b9272b572d9c8f2874c4..136236f51eb511a9c713beb4d88d646f2335b640 100644 (file)
@@ -608,7 +608,7 @@ key features:
     Popular scientific modules (such as numpy, scipy and pandas) and the
     ``conda`` package manager.
 
-`Enthought Deployment Manager <https://www.enthought.com/edm/>`_
+`Enthought Deployment Manager <https://assets.enthought.com/downloads/edm/>`_
     "The Next Generation Python Environment and Package Manager".
 
     Previously Enthought provided Canopy, but it `reached end of life in 2016
@@ -1305,7 +1305,7 @@ shipped with PyWin32.  It is an embeddable IDE with a built-in debugger.
 
 .. seealso::
 
-   `Win32 How Do I...? <http://timgolden.me.uk/python/win32_how_do_i.html>`_
+   `Win32 How Do I...? <https://timgolden.me.uk/python/win32_how_do_i.html>`_
       by Tim Golden
 
    `Python and COM <https://www.boddie.org.uk/python/COM.html>`_
index 7e235d4370edaa997cf765fdf4f6a7854ac5079e..8d2fa5270f1a0f93aa0a43b050b5a9b140e9356c 100644 (file)
@@ -684,11 +684,11 @@ includes a quick-start tutorial and a reference.
       Written by Facundo Batista and implemented by Facundo Batista, Eric Price,
       Raymond Hettinger, Aahz, and Tim Peters.
 
-   http://www.lahey.com/float.htm
+   `http://www.lahey.com/float.htm <https://web.archive.org/web/20230604072523/http://www.lahey.com/float.htm>`__
       The article uses Fortran code to illustrate many of the problems that
       floating-point inaccuracy can cause.
 
-   http://speleotrove.com/decimal/
+   https://speleotrove.com/decimal/
       A description of a decimal-based representation.  This representation is being
       proposed as a standard, and underlies the new Python decimal type.  Much of this
       material was written by Mike Cowlishaw, designer of the Rexx language.
index 0e5c3b9b5f9738fac0e9ed3fbcbcc76b2afd5383..ca5dfd2b1fcb0dd1e32b2bdc1348448fb8dcd82a 100644 (file)
@@ -1548,7 +1548,7 @@ changes, or look through the Subversion logs for all the details.
   *ciphers* argument that's a string listing the encryption algorithms
   to be allowed; the format of the string is described
   `in the OpenSSL documentation
-  <https://www.openssl.org/docs/man1.0.2/man1/ciphers.html>`__.
+  <https://docs.openssl.org/1.0.2/man1/ciphers/>`__.
   (Added by Antoine Pitrou; :issue:`8322`.)
 
   Another change makes the extension load all of OpenSSL's ciphers and
index 27b5e2ffab122a9e44d897fd534e70b92e772e10..99bb3934ed5f2492b6c6449c4cb5a419428870f5 100644 (file)
@@ -1254,7 +1254,7 @@ Deprecated
     We added the warning to raise awareness as issues encountered by code doing
     this are becoming more frequent. See the :func:`os.fork` documentation for
     more details along with `this discussion on fork being incompatible with threads
-    <https://discuss.python.org/t/33555>`_ for *why* we're now surfacing this
+    <https://discuss.python.org/t/concerns-regarding-deprecation-of-fork-with-alive-threads/33555>`_ for *why* we're now surfacing this
     longstanding platform compatibility problem to developers.
 
   When this warning appears due to usage of :mod:`multiprocessing` or
index 53185d3aec8ad628f703469186beaa65ed26373c..d866e805fd3a7ed48e62eda29ac93185080006fe 100644 (file)
@@ -715,7 +715,7 @@ this situation.  Also ensures that the :func:`tempfile.gettempdir` and
 Expose ``X509_V_FLAG_ALLOW_PROXY_CERTS`` as
 :const:`~ssl.VERIFY_ALLOW_PROXY_CERTS` to allow proxy certificate validation
 as explained in
-https://www.openssl.org/docs/man1.1.1/man7/proxy-certificates.html.
+https://docs.openssl.org/1.1.1/man7/proxy-certificates/.
 
 ..
 
index 382dae33fcaee1830514c41e38532ff98c71a7b3..bc708d163ce0e92bb4f25a79af3f9cae18e72ab1 100644 (file)
@@ -17,7 +17,7 @@ from the HACL* project.
 Updated the OpenSSL version used in Windows and macOS binary release builds
 to 1.1.1t to address :cve:`2023-0286`, :cve:`2022-4303`, and :cve:`2022-4303` per
 `the OpenSSL 2023-02-07 security advisory
-<https://www.openssl.org/news/secadv/20230207.txt>`_.
+<https://openssl-library.org/news/secadv/20230207.txt>`_.
 
 ..