Skip to content

Commit 92bc714

Browse files
[3.12] GH-103484: Fix permanently redirects reported by linkcheck (GH-124144) (GH-124152)
Fix redirects reported by linkcheck, update docs conf.py checks. (cherry picked from commit 0a32c69) Co-authored-by: Rafael Fontenelle <[email protected]>
1 parent 2f9dc65 commit 92bc714

17 files changed

+30
-26
lines changed

Doc/conf.py

+4
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,10 @@
537537
# Language redirects
538538
r'https://toml.io': 'https://toml.io/en/',
539539
r'https://www.redhat.com': 'https://www.redhat.com/en',
540+
# pypi.org project name normalization (upper to lowercase, underscore to hyphen)
541+
r'https://pypi.org/project/[A-Za-z\d_\-\.]+/': r'https://pypi.org/project/[a-z\d\-\.]+/',
542+
# Discourse title name expansion (text changes when title is edited)
543+
r'https://discuss\.python\.org/t/\d+': r'https://discuss\.python\.org/t/.*/\d+',
540544
# Other redirects
541545
r'https://www.boost.org/libs/.+': r'https://www.boost.org/doc/libs/\d_\d+_\d/.+',
542546
r'https://support.microsoft.com/en-us/help/\d+': 'https://support.microsoft.com/en-us/topic/.+',

Doc/faq/design.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ Can Python be compiled to machine code, C or some other language?
328328
-----------------------------------------------------------------
329329

330330
`Cython <https://cython.org/>`_ compiles a modified version of Python with
331-
optional annotations into C extensions. `Nuitka <https://www.nuitka.net/>`_ is
331+
optional annotations into C extensions. `Nuitka <https://nuitka.net/>`_ is
332332
an up-and-coming compiler of Python into C++ code, aiming to support the full
333333
Python language.
334334

@@ -345,7 +345,7 @@ to perform a garbage collection, obtain debugging statistics, and tune the
345345
collector's parameters.
346346

347347
Other implementations (such as `Jython <https://www.jython.org>`_ or
348-
`PyPy <https://www.pypy.org>`_), however, can rely on a different mechanism
348+
`PyPy <https://pypy.org>`_), however, can rely on a different mechanism
349349
such as a full-blown garbage collector. This difference can cause some
350350
subtle porting problems if your Python code depends on the behavior of the
351351
reference counting implementation.

Doc/library/hashlib.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ on the hash function used in digital signatures.
653653
by the signer.
654654

655655
(`NIST SP-800-106 "Randomized Hashing for Digital Signatures"
656-
<https://csrc.nist.gov/publications/detail/sp/800-106/archive/2009-02-25>`_)
656+
<https://csrc.nist.gov/pubs/sp/800/106/final>`_)
657657

658658
In BLAKE2 the salt is processed as a one-time input to the hash function during
659659
initialization, rather than as an input to each compression function.
@@ -807,8 +807,8 @@ Domain Dedication 1.0 Universal:
807807
.. _NIST-SP-800-132: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf
808808
.. _stackexchange pbkdf2 iterations question: https://security.stackexchange.com/questions/3959/recommended-of-iterations-when-using-pbkdf2-sha256/
809809
.. _Attacks on cryptographic hash algorithms: https://en.wikipedia.org/wiki/Cryptographic_hash_function#Attacks_on_cryptographic_hash_algorithms
810-
.. _the FIPS 180-4 standard: https://csrc.nist.gov/publications/detail/fips/180/4/final
811-
.. _the FIPS 202 standard: https://csrc.nist.gov/publications/detail/fips/202/final
810+
.. _the FIPS 180-4 standard: https://csrc.nist.gov/pubs/fips/180-4/upd1/final
811+
.. _the FIPS 202 standard: https://csrc.nist.gov/pubs/fips/202/final
812812
.. _HACL\* project: https://github.com/hacl-star/hacl-star
813813

814814

@@ -825,7 +825,7 @@ Domain Dedication 1.0 Universal:
825825
https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.180-4.pdf
826826
The FIPS 180-4 publication on Secure Hash Algorithms.
827827

828-
https://csrc.nist.gov/publications/detail/fips/202/final
828+
https://csrc.nist.gov/pubs/fips/202/final
829829
The FIPS 202 publication on the SHA-3 Standard.
830830

831831
https://www.blake2.net/

Doc/library/http.cookiejar.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ The following classes are provided:
137137
The Netscape protocol with the bugs fixed. Uses :mailheader:`Set-Cookie2` in
138138
place of :mailheader:`Set-Cookie`. Not widely used.
139139

140-
http://kristol.org/cookie/errata.html
140+
https://kristol.org/cookie/errata.html
141141
Unfinished errata to :rfc:`2965`.
142142

143143
:rfc:`2964` - Use of HTTP State Management

Doc/library/json.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
`JSON (JavaScript Object Notation) <https://json.org>`_, specified by
1515
:rfc:`7159` (which obsoletes :rfc:`4627`) and by
16-
`ECMA-404 <https://www.ecma-international.org/publications-and-standards/standards/ecma-404/>`_,
16+
`ECMA-404 <https://ecma-international.org/publications-and-standards/standards/ecma-404/>`_,
1717
is a lightweight data interchange format inspired by
1818
`JavaScript <https://en.wikipedia.org/wiki/JavaScript>`_ object literal syntax
1919
(although it is not a strict subset of JavaScript [#rfc-errata]_ ).
@@ -546,7 +546,7 @@ Standard Compliance and Interoperability
546546
----------------------------------------
547547

548548
The JSON format is specified by :rfc:`7159` and by
549-
`ECMA-404 <https://www.ecma-international.org/publications-and-standards/standards/ecma-404/>`_.
549+
`ECMA-404 <https://ecma-international.org/publications-and-standards/standards/ecma-404/>`_.
550550
This section details this module's level of compliance with the RFC.
551551
For simplicity, :class:`JSONEncoder` and :class:`JSONDecoder` subclasses, and
552552
parameters other than those explicitly mentioned, are not considered.

Doc/library/ssl.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -1522,7 +1522,7 @@ to speed up repeated connections from the same clients.
15221522
The *capath* string, if present, is
15231523
the path to a directory containing several CA certificates in PEM format,
15241524
following an `OpenSSL specific layout
1525-
<https://www.openssl.org/docs/manmaster/man3/SSL_CTX_load_verify_locations.html>`_.
1525+
<https://docs.openssl.org/master/man3/SSL_CTX_load_verify_locations/>`_.
15261526

15271527
The *cadata* object, if present, is either an ASCII string of one or more
15281528
PEM-encoded certificates or a :term:`bytes-like object` of DER-encoded
@@ -1597,7 +1597,7 @@ to speed up repeated connections from the same clients.
15971597

15981598
Set the available ciphers for sockets created with this context.
15991599
It should be a string in the `OpenSSL cipher list format
1600-
<https://www.openssl.org/docs/manmaster/man1/ciphers.html>`_.
1600+
<https://docs.openssl.org/master/man1/ciphers/>`_.
16011601
If no cipher can be selected (because compile-time options or other
16021602
configuration forbids use of all the specified ciphers), an
16031603
:class:`SSLError` will be raised.
@@ -1829,7 +1829,7 @@ to speed up repeated connections from the same clients.
18291829
.. method:: SSLContext.session_stats()
18301830

18311831
Get statistics about the SSL sessions created or managed by this context.
1832-
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
1832+
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
18331833
numeric values. For example, here is the total number of hits and misses
18341834
in the session cache since the context was created::
18351835

@@ -1972,7 +1972,7 @@ to speed up repeated connections from the same clients.
19721972
.. attribute:: SSLContext.security_level
19731973

19741974
An integer representing the `security level
1975-
<https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_security_level.html>`_
1975+
<https://docs.openssl.org/master/man3/SSL_CTX_get_security_level/>`_
19761976
for the context. This attribute is read-only.
19771977

19781978
.. versionadded:: 3.10

Doc/library/tkinter.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ details that are unchanged.
5858
* `Modern Tkinter for Busy Python Developers <https://tkdocs.com/book.html>`_
5959
By Mark Roseman. (ISBN 978-1999149567)
6060

61-
* `Python GUI programming with Tkinter <https://www.packtpub.com/product/python-gui-programming-with-tkinter/9781788835886>`_
61+
* `Python GUI programming with Tkinter <https://www.packtpub.com/en-us/product/python-gui-programming-with-tkinter-9781788835886>`_
6262
By Alan D. Moore. (ISBN 978-1788835886)
6363

6464
* `Programming Python <https://learning-python.com/about-pp4e.html>`_

Doc/library/typing.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2581,7 +2581,7 @@ Functions and decorators
25812581

25822582
.. seealso::
25832583
`Unreachable Code and Exhaustiveness Checking
2584-
<https://typing.readthedocs.io/en/latest/source/unreachable.html>`__ has more
2584+
<https://typing.readthedocs.io/en/latest/guides/unreachable.html>`__ has more
25852585
information about exhaustiveness checking with static typing.
25862586

25872587
.. versionadded:: 3.11

Doc/library/xmlrpc.client.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ between conformable Python objects and XML on the wire.
165165
A good description of XML-RPC operation and client software in several languages.
166166
Contains pretty much everything an XML-RPC client developer needs to know.
167167

168-
`XML-RPC Introspection <https://xmlrpc-c.sourceforge.net/introspection.html>`_
168+
`XML-RPC Introspection <https://xmlrpc-c.sourceforge.io/introspection.html>`_
169169
Describes the XML-RPC protocol extension for introspection.
170170

171171
`XML-RPC Specification <http://xmlrpc.scripting.com/spec.html>`_

Doc/reference/introduction.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ PyPy
7474
and a Just in Time compiler. One of the goals of the project is to encourage
7575
experimentation with the language itself by making it easier to modify the
7676
interpreter (since it is written in Python). Additional information is
77-
available on `the PyPy project's home page <https://www.pypy.org/>`_.
77+
available on `the PyPy project's home page <https://pypy.org/>`_.
7878

7979
Each of these implementations varies in some way from the language as documented
8080
in this manual, or introduces specific information beyond what's covered in the

Doc/using/mac.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ https://www.activestate.com; it can also be built from source.
155155
A number of alternative macOS GUI toolkits are available:
156156

157157
* `PySide <https://www.qt.io/qt-for-python>`__: Official Python bindings to the
158-
`Qt GUI toolkit <https://qt.io>`__.
158+
`Qt GUI toolkit <https://www.qt.io>`__.
159159

160160
* `PyQt <https://riverbankcomputing.com/software/pyqt/intro>`__: Alternative
161161
Python bindings to Qt.

Doc/using/windows.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ key features:
548548
Popular scientific modules (such as numpy, scipy and pandas) and the
549549
``conda`` package manager.
550550

551-
`Enthought Deployment Manager <https://www.enthought.com/edm/>`_
551+
`Enthought Deployment Manager <https://assets.enthought.com/downloads/edm/>`_
552552
"The Next Generation Python Environment and Package Manager".
553553

554554
Previously Enthought provided Canopy, but it `reached end of life in 2016
@@ -1237,7 +1237,7 @@ shipped with PyWin32. It is an embeddable IDE with a built-in debugger.
12371237

12381238
.. seealso::
12391239

1240-
`Win32 How Do I...? <http://timgolden.me.uk/python/win32_how_do_i.html>`_
1240+
`Win32 How Do I...? <https://timgolden.me.uk/python/win32_how_do_i.html>`_
12411241
by Tim Golden
12421242

12431243
`Python and COM <https://www.boddie.org.uk/python/COM.html>`_

Doc/whatsnew/2.4.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -684,11 +684,11 @@ includes a quick-start tutorial and a reference.
684684
Written by Facundo Batista and implemented by Facundo Batista, Eric Price,
685685
Raymond Hettinger, Aahz, and Tim Peters.
686686

687-
http://www.lahey.com/float.htm
687+
`http://www.lahey.com/float.htm <https://web.archive.org/web/20230604072523/http://www.lahey.com/float.htm>`__
688688
The article uses Fortran code to illustrate many of the problems that
689689
floating-point inaccuracy can cause.
690690

691-
http://speleotrove.com/decimal/
691+
https://speleotrove.com/decimal/
692692
A description of a decimal-based representation. This representation is being
693693
proposed as a standard, and underlies the new Python decimal type. Much of this
694694
material was written by Mike Cowlishaw, designer of the Rexx language.

Doc/whatsnew/2.7.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1548,7 +1548,7 @@ changes, or look through the Subversion logs for all the details.
15481548
*ciphers* argument that's a string listing the encryption algorithms
15491549
to be allowed; the format of the string is described
15501550
`in the OpenSSL documentation
1551-
<https://www.openssl.org/docs/man1.0.2/man1/ciphers.html>`__.
1551+
<https://docs.openssl.org/1.0.2/man1/ciphers/>`__.
15521552
(Added by Antoine Pitrou; :issue:`8322`.)
15531553

15541554
Another change makes the extension load all of OpenSSL's ciphers and

Doc/whatsnew/3.12.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1265,7 +1265,7 @@ Deprecated
12651265
We added the warning to raise awareness as issues encountered by code doing
12661266
this are becoming more frequent. See the :func:`os.fork` documentation for
12671267
more details along with `this discussion on fork being incompatible with threads
1268-
<https://discuss.python.org/t/33555>`_ for *why* we're now surfacing this
1268+
<https://discuss.python.org/t/concerns-regarding-deprecation-of-fork-with-alive-threads/33555>`_ for *why* we're now surfacing this
12691269
longstanding platform compatibility problem to developers.
12701270

12711271
When this warning appears due to usage of :mod:`multiprocessing` or

Misc/NEWS.d/3.10.0a7.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ this situation. Also ensures that the :func:`tempfile.gettempdir` and
715715
Expose ``X509_V_FLAG_ALLOW_PROXY_CERTS`` as
716716
:const:`~ssl.VERIFY_ALLOW_PROXY_CERTS` to allow proxy certificate validation
717717
as explained in
718-
https://www.openssl.org/docs/man1.1.1/man7/proxy-certificates.html.
718+
https://docs.openssl.org/1.1.1/man7/proxy-certificates/.
719719

720720
..
721721

Misc/NEWS.d/3.12.0a6.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ from the HACL* project.
1717
Updated the OpenSSL version used in Windows and macOS binary release builds
1818
to 1.1.1t to address :cve:`2023-0286`, :cve:`2022-4303`, and :cve:`2022-4303` per
1919
`the OpenSSL 2023-02-07 security advisory
20-
<https://www.openssl.org/news/secadv/20230207.txt>`_.
20+
<https://openssl-library.org/news/secadv/20230207.txt>`_.
2121

2222
..
2323

0 commit comments

Comments
 (0)