-
Notifications
You must be signed in to change notification settings - Fork 0
/
fix-redir-with-found.diff
296 lines (251 loc) · 13.8 KB
/
fix-redir-with-found.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
diff --git a/Doc/conf.py b/Doc/conf.py
index 485c0bdf84..2fdaad85ad 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -292,6 +292,8 @@
r'https://www.sqlite.org': 'https://www.sqlite.org/index.html',
r'https://mitpress.mit.edu/sicp$': 'https://mitpress.mit.edu/9780262510875/structure-and-interpretation-of-computer-programs/',
r'https://www.python.org/psf/': 'https://www.python.org/psf-landing/',
+ # docs.python.org to docs.python.org/3/ (with/out language code)
+ r'https://docs.python.org(/[a-z]{2}(-[a-z]{2})?)?': r'https://docs.python.org(/[a-z]{2}(-[a-z]{2})?)?(/3/)?',
}
linkcheck_anchors_ignore = [
diff --git a/Doc/distributing/index.rst b/Doc/distributing/index.rst
index d237f8f082..454e170386 100644
--- a/Doc/distributing/index.rst
+++ b/Doc/distributing/index.rst
@@ -60,7 +60,7 @@ Key terms
extensions, to be installed on a system without needing to be built
locally.
-.. _setuptools: https://setuptools.readthedocs.io/en/latest/
+.. _setuptools: https://setuptools.pypa.io/en/latest/
.. _wheel: https://wheel.readthedocs.io/
Open source licensing and collaboration
diff --git a/Doc/extending/building.rst b/Doc/extending/building.rst
index 880bb33ee5..6c502836d1 100644
--- a/Doc/extending/building.rst
+++ b/Doc/extending/building.rst
@@ -52,5 +52,5 @@ Building C and C++ Extensions with setuptools
Python 3.12 and newer no longer come with distutils. Please refer to the
``setuptools`` documentation at
-https://setuptools.readthedocs.io/en/latest/setuptools.html
+https://setuptools.pypa.io/en/latest/setuptools.html
to learn more about how build and distribute C/C++ extensions with setuptools.
diff --git a/Doc/howto/isolating-extensions.rst b/Doc/howto/isolating-extensions.rst
index 0262054ae2..a77121dcf4 100644
--- a/Doc/howto/isolating-extensions.rst
+++ b/Doc/howto/isolating-extensions.rst
@@ -201,7 +201,7 @@ require some work and make the code longer; this is the price for
modules which can be unloaded cleanly.
An example of a module with per-module state is currently available as
-`xxlimited <https://github.com/python/cpython/blob/master/Modules/xxlimited.c>`__;
+:source:`xxlimited <Modules/xxlimited.c>`;
example module initialization shown at the bottom of the file.
diff --git a/Doc/install/index.rst b/Doc/install/index.rst
index ab581d785e..008027b6c1 100644
--- a/Doc/install/index.rst
+++ b/Doc/install/index.rst
@@ -26,7 +26,7 @@
.. note::
This document is being retained solely until the ``setuptools`` documentation
- at https://setuptools.readthedocs.io/en/latest/setuptools.html
+ at https://setuptools.pypa.io/en/latest/setuptools.html
independently covers all of the relevant information currently included here.
.. note::
diff --git a/Doc/library/importlib.metadata.rst b/Doc/library/importlib.metadata.rst
index d2cc769e2c..dbe025c85a 100644
--- a/Doc/library/importlib.metadata.rst
+++ b/Doc/library/importlib.metadata.rst
@@ -398,5 +398,5 @@ a custom finder, return instances of this derived ``Distribution`` in the
``find_distributions()`` method.
-.. _`entry point API`: https://setuptools.readthedocs.io/en/latest/pkg_resources.html#entry-points
-.. _`metadata API`: https://setuptools.readthedocs.io/en/latest/pkg_resources.html#metadata-api
+.. _`entry point API`: https://setuptools.pypa.io/en/latest/pkg_resources.html#entry-points
+.. _`metadata API`: https://setuptools.pypa.io/en/latest/pkg_resources.html#metadata-api
diff --git a/Doc/library/importlib.resources.rst b/Doc/library/importlib.resources.rst
index 755693840f..a40359b080 100644
--- a/Doc/library/importlib.resources.rst
+++ b/Doc/library/importlib.resources.rst
@@ -33,9 +33,9 @@ for example, a package and its resources can be imported from a zip file using
.. note::
This module provides functionality similar to `pkg_resources
- <https://setuptools.readthedocs.io/en/latest/pkg_resources.html>`_ `Basic
+ <https://setuptools.pypa.io/en/latest/pkg_resources.html>`_ `Basic
Resource Access
- <https://setuptools.readthedocs.io/en/latest/pkg_resources.html#basic-resource-access>`_
+ <https://setuptools.pypa.io/en/latest/pkg_resources.html#basic-resource-access>`_
without the performance overhead of that package. This makes reading
resources included in packages easier, with more stable and consistent
semantics.
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
index c192919ac6..d75b108ab5 100644
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -569,14 +569,14 @@ Simulation of arrival times and service deliveries for a multiserver queue::
including simulation, sampling, shuffling, and cross-validation.
`Economics Simulation
- <https://nbviewer.jupyter.org/url/norvig.com/ipython/Economics.ipynb>`_
+ <https://nbviewer.org/url/norvig.com/ipython/Economics.ipynb>`_
a simulation of a marketplace by
`Peter Norvig <https://norvig.com/bio.html>`_ that shows effective
use of many of the tools and distributions provided by this module
(gauss, uniform, sample, betavariate, choice, triangular, and randrange).
`A Concrete Introduction to Probability (using Python)
- <https://nbviewer.jupyter.org/url/norvig.com/ipython/Probability.ipynb>`_
+ <https://nbviewer.org/url/norvig.com/ipython/Probability.ipynb>`_
a tutorial by `Peter Norvig <https://norvig.com/bio.html>`_ covering
the basics of probability theory, how to write simulations, and
how to perform data analysis using Python.
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index 89673b8006..1c190a74e1 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -1102,7 +1102,7 @@ Connection objects
.. versionadded:: 3.12
The *entrypoint* parameter.
- .. _Loading an Extension: https://www.sqlite.org/loadext.html#loading_an_extension_
+ .. _Loading an Extension: https://www.sqlite.org/loadext.html#loading_an_extension
.. method:: iterdump
diff --git a/Doc/library/tkinter.rst b/Doc/library/tkinter.rst
index c8e4317be7..658b348c32 100644
--- a/Doc/library/tkinter.rst
+++ b/Doc/library/tkinter.rst
@@ -42,12 +42,12 @@ details that are unchanged.
Extensive tutorial on creating user interfaces with Tkinter. Explains key concepts,
and illustrates recommended approaches using the modern API.
- * `Tkinter 8.5 reference: a GUI for Python <https://www.tkdocs.com/shipman/>`_
+ * `Tkinter 8.5 reference: a GUI for Python <https://tkdocs.com/shipman/>`_
Reference documentation for Tkinter 8.5 detailing available classes, methods, and options.
Tcl/Tk Resources:
- * `Tk commands <https://www.tcl.tk/man/tcl8.6/TkCmd/contents.htm>`_
+ * `Tk commands <https://www.tcl.tk/man/tcl8.6/TkCmd/contents.html>`_
Comprehensive reference to each of the underlying Tcl/Tk commands used by Tkinter.
* `Tcl/Tk Home Page <https://www.tcl.tk>`_
@@ -447,7 +447,7 @@ is helpful.
Navigating the Tcl/Tk Reference Manual
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-As noted, the official `Tk commands <https://www.tcl.tk/man/tcl8.6/TkCmd/contents.htm>`_
+As noted, the official `Tk commands <https://www.tcl.tk/man/tcl8.6/TkCmd/contents.html>`_
reference manual (man pages) is often the most accurate description of what
specific operations on widgets do. Even when you know the name of the option
or method that you need, you may still have a few places to look.
@@ -476,20 +476,20 @@ name of a method to call).
In the official Tcl/Tk reference documentation, you'll find most operations
that look like method calls on the man page for a specific widget (e.g.,
you'll find the :meth:`invoke` method on the
-`ttk::button <https://www.tcl.tk/man/tcl8.6/TkCmd/ttk_button.htm>`_
+`ttk::button <https://www.tcl.tk/man/tcl8.6/TkCmd/ttk_button.html>`_
man page), while functions that take a widget as a parameter often have
their own man page (e.g.,
-`grid <https://www.tcl.tk/man/tcl8.6/TkCmd/grid.htm>`_).
+`grid <https://www.tcl.tk/man/tcl8.6/TkCmd/grid.html>`_).
You'll find many common options and methods in the
-`options <https://www.tcl.tk/man/tcl8.6/TkCmd/options.htm>`_ or
-`ttk::widget <https://www.tcl.tk/man/tcl8.6/TkCmd/ttk_widget.htm>`_ man
+`options <https://www.tcl.tk/man/tcl8.6/TkCmd/options.html>`_ or
+`ttk::widget <https://www.tcl.tk/man/tcl8.6/TkCmd/ttk_widget.html>`_ man
pages, while others are found in the man page for a specific widget class.
You'll also find that many Tkinter methods have compound names, e.g.,
:func:`winfo_x`, :func:`winfo_height`, :func:`winfo_viewable`. You'd find
documentation for all of these in the
-`winfo <https://www.tcl.tk/man/tcl8.6/TkCmd/winfo.htm>`_ man page.
+`winfo <https://www.tcl.tk/man/tcl8.6/TkCmd/winfo.html>`_ man page.
.. note::
Somewhat confusingly, there are also methods on all Tkinter widgets
diff --git a/Doc/library/tkinter.ttk.rst b/Doc/library/tkinter.ttk.rst
index 4ff2b2159c..7c17f241d5 100644
--- a/Doc/library/tkinter.ttk.rst
+++ b/Doc/library/tkinter.ttk.rst
@@ -24,7 +24,7 @@ appearance.
.. seealso::
- `Tk Widget Styling Support <https://core.tcl.tk/tips/doc/trunk/tip/48.md>`_
+ `Tk Widget Styling Support <https://core.tcl-lang.org/tips/doc/trunk/tip/48.md>`_
A document introducing theming support for Tk
diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst
index 1b05458280..9ddee5048c 100644
--- a/Doc/library/urllib.request.rst
+++ b/Doc/library/urllib.request.rst
@@ -18,7 +18,7 @@ authentication, redirections, cookies and more.
.. seealso::
- The `Requests package <https://requests.readthedocs.io/en/master/>`_
+ The `Requests package <https://requests.readthedocs.io/en/latest/>`_
is recommended for a higher-level HTTP client interface.
.. include:: ../includes/wasm-notavail.rst
diff --git a/Doc/library/xmlrpc.client.rst b/Doc/library/xmlrpc.client.rst
index 146c4fd768..5f8f865003 100644
--- a/Doc/library/xmlrpc.client.rst
+++ b/Doc/library/xmlrpc.client.rst
@@ -168,7 +168,7 @@ between conformable Python objects and XML on the wire.
`XML-RPC Introspection <https://xmlrpc-c.sourceforge.net/introspection.html>`_
Describes the XML-RPC protocol extension for introspection.
- `XML-RPC Specification <http://xmlrpc.scripting.com/spec.html>`_
+ `XML-RPC Specification <http://xmlrpc.com/spec.md>`_
The official specification.
.. _serverproxy-objects:
diff --git a/Doc/whatsnew/2.2.rst b/Doc/whatsnew/2.2.rst
index 82aff0be1e..9ebf8358a4 100644
--- a/Doc/whatsnew/2.2.rst
+++ b/Doc/whatsnew/2.2.rst
@@ -957,7 +957,7 @@ New and Improved Modules
# 'title': 'html2fo 0.3 (Default)'}, ... ]
The :mod:`SimpleXMLRPCServer` module makes it easy to create straightforward
- XML-RPC servers. See http://xmlrpc.scripting.com/ for more information about XML-RPC.
+ XML-RPC servers. See http://xmlrpc.com/ for more information about XML-RPC.
* The new :mod:`hmac` module implements the HMAC algorithm described by
:rfc:`2104`. (Contributed by Gerhard Häring.)
diff --git a/Doc/whatsnew/2.4.rst b/Doc/whatsnew/2.4.rst
index 98dc83fe93..9c5e423a52 100644
--- a/Doc/whatsnew/2.4.rst
+++ b/Doc/whatsnew/2.4.rst
@@ -687,7 +687,7 @@ includes a quick-start tutorial and a reference.
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.
diff --git a/Doc/whatsnew/2.7.rst b/Doc/whatsnew/2.7.rst
index 36afcb163f..37b0a9d7d3 100644
--- a/Doc/whatsnew/2.7.rst
+++ b/Doc/whatsnew/2.7.rst
@@ -1808,7 +1808,7 @@ on being added to Tcl/Tck release 8.5.
To learn more, read the :mod:`ttk` module documentation. You may also
wish to read the Tcl/Tk manual page describing the
Ttk theme engine, available at
-https://www.tcl.tk/man/tcl8.5/TkCmd/ttk_intro.htm. Some
+https://www.tcl.tk/man/tcl8.5/TkCmd/ttk_intro.html. Some
screenshots of the Python/Ttk code in use are at
https://code.google.com/archive/p/python-ttk/wikis/Screenshots.wiki.
diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst
index 7af0c02883..cb3caca270 100644
--- a/Doc/whatsnew/3.2.rst
+++ b/Doc/whatsnew/3.2.rst
@@ -2519,7 +2519,7 @@ members of the community to create and share external changesets. See
:pep:`385` for details.
To learn to use the new version control system, see the `Quick Start
-<https://www.mercurial-scm.org/wiki/QuickStart>`_ or the `Guide to
+<https://wiki.mercurial-scm.org/QuickStart>`_ or the `Guide to
Mercurial Workflows <https://www.mercurial-scm.org/guide>`_.
diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst
index 14b6425cea..980c43eb64 100644
--- a/Doc/whatsnew/3.5.rst
+++ b/Doc/whatsnew/3.5.rst
@@ -2212,7 +2212,7 @@ for details.)
The :c:member:`PyTypeObject.tp_finalize` slot is now part of the stable ABI.
Windows builds now require Microsoft Visual C++ 14.0, which
-is available as part of `Visual Studio 2015 <https://visualstudio.microsoft.com/en/vs/older-downloads/#visual-studio-2015-and-other-products>`_.
+is available as part of `Visual Studio 2015 <https://visualstudio.microsoft.com/vs/older-downloads/#visual-studio-2015-and-other-products>`_.
Extension modules now include a platform information tag in their filename on
some platforms (the tag is optional, and CPython will import extensions without
diff --git a/Misc/NEWS.d/3.11.0b1.rst b/Misc/NEWS.d/3.11.0b1.rst
index d8c2ec0a79..0a1b8a0432 100644
--- a/Misc/NEWS.d/3.11.0b1.rst
+++ b/Misc/NEWS.d/3.11.0b1.rst
@@ -1801,7 +1801,7 @@ The documentation now lists which members of C structs are part of the
All docstrings in code snippets are now wrapped into :func:`PyDoc_STR` to
follow the guideline of `PEP 7's Documentation Strings paragraph
-<https://www.python.org/dev/peps/pep-0007/#documentation-strings>`_. Patch
+<https://peps.python.org/pep-0007/#documentation-strings>`_. Patch
by Oleg Iarygin.
..