10000 bpo-47126: Update to canonical PEP URLs specified by PEP 676 (GH-32124) · python/cpython@6881ea9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6881ea9

Browse files
authored
bpo-47126: Update to canonical PEP URLs specified by PEP 676 (GH-32124)
1 parent d8f530f commit 6881ea9

File tree

24 files changed

+28
-29
lines changed

24 files changed

+28
-29
lines changed

Doc/c-api/code.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ bound into a function.
5858
If you just need the line number of a frame, use :c:func:`PyFrame_GetLineNumber` instead.
5959
6060
For efficiently iterating over the line numbers in a code object, use `the API described in PEP 626
61-
<https://www.python.org/dev/peps/pep-0626/#out-of-process-debuggers-and-profilers>`_.
61+
<https://peps.python.org/pep-0626/#out-of-process-debuggers-and-profilers>`_.
6262
6363
.. c:function:: int PyCode_Addr2Location(PyObject *co, int byte_offset, int *start_line, int *start_column, int *end_line, int *end_column)
6464

Doc/conf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,7 @@
218218
# ----------------------------
219219

220220
# Ignore certain URLs.
221-
linkcheck_ignore = [r'https://bugs.python.org/(issue)?\d+',
222-
# Ignore PEPs for now, they all have permanent redirects.
223-
r'http://www.python.org/dev/peps/pep-\d+']
221+
linkcheck_ignore = [r'https://bugs.python.org/(issue)?\d+']
224222

225223

226224
# Options for extensions

Doc/distutils/sourcedist.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Notes:
6262
requires the :program:`compress` program. Notice that this format is now
6363
pending for deprecation and will be removed in the future versions of Python.
6464
(5)
65-
deprecated by `PEP 527 <https://www.python.org/dev/peps/pep-0527/>`_;
65+
deprecated by `PEP 527 <https://peps.python.org/pep-0527/>`_;
6666
`PyPI <https://pypi.org>`_ only accepts ``.zip`` and ``.tar.gz`` files.
6767

6868
When using any ``tar`` format (``gztar``, ``bztar``, ``xztar``, ``ztar`` or

Doc/faq/general.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ The latest stable releases can always be found on the `Python download page
310310
<https://www.python.org/downloads/>`_. There are two production-ready versions
311311
of Python: 2.x and 3.x. The recommended version is 3.x, which is supported by
312312
most widely used libraries. Although 2.x is still widely used, `it is not
313-
maintained anymore <https://www.python.org/dev/peps/pep-0373/>`_.
313+
maintained anymore <https://peps.python.org/pep-0373/>`_.
314314

315315
How many people are using Python?
316316
---------------------------------
@@ -345,7 +345,7 @@ include Google, Yahoo, and Lucasfilm Ltd.
345345
What new developments are expected for Python in the future?
346346
------------------------------------------------------------
347347

348-
See https://www.python.org/dev/peps/ for the Python Enhancement Proposals
348+
See https://peps.python.org/ for the Python Enhancement Proposals
349349
(PEPs). PEPs are design documents describing a suggested new feature for Python,
350350
providing a concise technical specification and a rationale. Look for a PEP
351351
titled "Python X.Y Release Schedule", where X.Y is a version that hasn't been

Doc/library/ast.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1826,7 +1826,7 @@ Function and class definitions
18261826
* ``bases`` is a list of nodes for explicitly specified base classes.
18271827
* ``keywords`` is a list of :class:`keyword` nodes, principally for 'metaclass'.
18281828
Other keywords will be passed to the metaclass, as per `PEP-3115
1829-
<https://www.python.org/dev/peps/pep-3115/>`_.
1829+
<https://peps.python.org/pep-3115/>`_.
18301830
* ``starargs`` and ``kwargs`` are each a single node, as in a function call.
18311831
starargs will be expanded to join the list of base classes, and kwargs will
18321832
be passed to the metaclass.

Doc/library/functools.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ The :mod:`functools` module defines the following functions:
208208
@lru_cache(maxsize=32)
209209
def get_pep(num):
210210
'Retrieve text of a Python Enhancement Proposal'
211-
resource = 'https://www.python.org/dev/peps/pep-%04d/' % num
211+
resource = 'https://peps.python.org/pep-%04d/' % num
212212
try:
213213
with urllib.request.urlopen(resource) as s:
214214
return s.read()

Doc/library/sqlite3.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ Module functions and constants
191191
| | | | connections and cursors |
192192
+------------------+-----------------+----------------------+-------------------------------+
193193

194-
.. _threadsafety: https://www.python.org/dev/peps/pep-0249/#threadsafety
194+
.. _threadsafety: https://peps.python.org/pep-0249/#threadsafety
195195
.. _SQLITE_THREADSAFE: https://sqlite.org/compile.html#threadsafe
196196

197197
.. versionchanged:: 3.11

Doc/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Sphinx version is pinned so that new versions that introduce new warnings
44
# won't suddenly cause build failures. Updating the version is fine as long
55
# as no warnings are raised by doing so.
6-
sphinx==4.2.0
6+
sphinx==4.5.0
77

88
blurb
99

Doc/tools/templates/indexsidebar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h3>{% trans %}Docs by version{% endtrans %}</h3>
1010
<h3>{% trans %}Other resources{% endtrans %}</h3>
1111
<ul>
1212
{# XXX: many of these should probably be merged in the main docs #}
13-
<li><a href="https://www.python.org/dev/peps/">{% trans %}PEP Index{% endtrans %}</a></li>
13+
<li><a href="https://peps.python.org/">{% trans %}PEP Index{% endtrans %}</a></li>
1414
<li><a href="https://wiki.python.org/moin/BeginnersGuide">{% trans %}Beginner's Guide{% endtrans %}</a></li>
1515
<li><a href="https://wiki.python.org/moin/PythonBooks">{% trans %}Book List{% endtrans %}</a></li>
1616
<li><a href="https://www.python.org/doc/av/">{% trans %}Audio/Visual Talks{% endtrans %}</a></li>

Doc/whatsnew/2.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Guidelines":
130130
Read the rest of :pep:`1` for the details of the PEP editorial process, style, and
131131
format. PEPs are kept in the Python CVS tree on SourceForge, though they're not
132132
part of the Python 2.0 distribution, and are also available in HTML form from
133-
https://www.python.org/dev/peps/. As of September 2000, there are 25 PEPS, ranging
133+
https://peps.python.org/. As of September 2000, there are 25 PEPS, ranging
134134
from :pep:`201`, "Lockstep Iteration", to PEP 225, "Elementwise/Objectwise
135135
Operators".
136136

Doc/whatsnew/2.7.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2681,7 +2681,7 @@ these commands by default, as long as, when invoked, they provide clear and
26812681
simple directions on how to install them on that platform (usually using
26822682
the system package manager).
26832683

2684-
__ https://www.python.org/dev/peps/pep-0477/#disabling-ensurepip-by-downstream-distributors
2684+
__ https://peps.python.org/pep-0477/#disabling-ensurepip-by-downstream-distributors
26852685

26862686

26872687
Documentation Changes

Doc/whatsnew/3.4.rst

Lines changed: 1 addition & 1 deletion
< 57AE col width="100%"/>
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ these commands by default, as long as, when invoked, they provide clear and
220220
simple directions on how to install them on that platform (usually using
221221
the system package manager).
222222

223-
__ https://www.python.org/dev/peps/pep-0453/#recommendations-for-downstream-distributors
223+
__ https://peps.python.org/pep-0453/#recommendations-for-downstream-distributors
224224

225225
.. note::
226226

Doc/whatsnew/3.7.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ module:
353353

354354
The new functions return the number of nanoseconds as an integer value.
355355

356-
`Measurements <https://www.python.org/dev/peps/pep-0564/#annex-clocks-resolution-in-python>`_
356+
`Measurements <https://peps.python.org/pep-0564/#annex-clocks-resolution-in-python>`_
357357
show that on Linux and Windows the resolution of :func:`time.time_ns` is
358358
approximately 3 times better than that of :func:`time.time`.
359359

Lib/dataclasses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def __repr__(self):
298298
# This is used to support the PEP 487 __set_name__ protocol in the
299299
# case where we're using a field that contains a descriptor as a
300300
# default value. For details on __set_name__, see
301-
# https://www.python.org/dev/peps/pep-0487/#implementation-details.
301+
# https://peps.python.org/pep-0487/#implementation-details.
302302
#
303303
# Note that in _process_class, this Field object is overwritten
304304
# with the default value, so the end result is a descriptor that

Lib/distutils/command/build_ext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ def get_export_symbols(self, ext):
692692
suffix = '_' + ext.name.split('.')[-1]
693693
try:
694694
# Unicode module name support as defined in PEP-489
695-
# https://www.python.org/dev/peps/pep-0489/#export-hook-name
695+
# https://peps.python.org/pep-0489/#export-hook-name
696696
suffix.encode('ascii')
697697
except UnicodeEncodeError:
698698
suffix = 'U' + suffix.encode('punycode').replace(b'-', b'_').decode('ascii')

Lib/pydoc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,10 +701,10 @@ def markup(self, text, escape=None, funcs={}, classes={}, methods={}):
701701
url = escape(all).replace('"', '&quot;')
702702
results.append('<a href="%s">%s</a>' % (url, url))
703703
elif rfc:
704-
url = 'http://www.rfc-editor.org/rfc/rfc%d.txt' % int(rfc)
704+
url = 'https://www.rfc-editor.org/rfc/rfc%d.txt' % int(rfc)
705705
results.append('<a href="%s">%s</a>' % (url, escape(all)))
706706
elif pep:
707-
url = 'https://www.python.org/dev/peps/pep-%04d/' % int(pep)
707+
url = 'https://peps.python.org/pep-%04d/' % int(pep)
708708
results.append('<a href="%s">%s</a>' % (url, escape(all)))
709709
elif selfdot:
710710
# Create a link for methods like 'self.method(...)'

Lib/secrets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
managing secrets such as account authentication, tokens, and similar.
33
44
See PEP 506 for more information.
5-
https://www.python.org/dev/peps/pep-0506/
5+
https://peps.python.org/pep-0506/
66
77
"""
88

Lib/test/test_docxmlrpc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ def test_autolinking(self):
146146
10000 self.assertIn(
147147
(b'<dl><dt><a name="-add"><strong>add</strong></a>(x, y)</dt><dd>'
148148
b'<tt>Add&nbsp;two&nbsp;instances&nbsp;together.&nbsp;This&nbsp;'
149-
b'follows&nbsp;<a href="https://www.python.org/dev/peps/pep-0008/">'
149+
b'follows&nbsp;<a href="https://peps.python.org/pep-0008/">'
150150
b'PEP008</a>,&nbsp;but&nbsp;has&nbsp;nothing<br>\nto&nbsp;do&nbsp;'
151-
b'with&nbsp;<a href="http://www.rfc-editor.org/rfc/rfc1952.txt">'
151+
b'with&nbsp;<a href="https://www.rfc-editor.org/rfc/rfc1952.txt">'
152152
b'RFC1952</a>.&nbsp;Case&nbsp;should&nbsp;matter:&nbsp;pEp008&nbsp;'
153153
b'and&nbsp;rFC1952.&nbsp;&nbsp;Things<br>\nthat&nbsp;start&nbsp;'
154154
b'with&nbsp;http&nbsp;and&nbsp;ftp&nbsp;should&nbsp;be&nbsp;'

Lib/weakref.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
This module is an implementation of PEP 205:
44
5-
https://www.python.org/dev/peps/pep-0205/
5+
https://peps.python.org/pep-0205/
66
"""
77

88
# Naming convention: Variables named "wr" are weak reference objects;

Lib/xmlrpc/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,10 +731,10 @@ def markup(self, text, escape=None, funcs={}, classes={}, methods={}):
731731
url = escape(all).replace('"', '&quot;')
732732
results.append('<a href="%s">%s</a>' % (url, url))
733733
elif rfc:
734-
url = 'http://www.rfc-editor.org/rfc/rfc%d.txt' % int(rfc)
734+
url = 'https://www.rfc-editor.org/rfc/rfc%d.txt' % int(rfc)
735735
results.append('<a href="%s">%s</a>' % (url, escape(all)))
736736
elif pep:
737-
url = 'https://www.python.org/dev/peps/pep-%04d/' % int(pep)
737+
url = 'https://peps.python.org/pep-%04d/' % int(pep)
738738
results.append('<a href="%s">%s</a>' % (url, escape(all)))
739739
elif text[end:end+1] == '(':
740740
results.append(self.namelink(name, methods, funcs, classes))
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update PEP URLs to :pep:`676`'s new canonical form.

Parser/tokenizer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ ensure_utf8(char *line, struct tok_state *tok)
523523
"Non-UTF-8 code starting with '\\x%.2x' "
524524
"in file %U on line %i, "
525525
"but no encoding declared; "
526-
"see https://python.org/dev/peps/pep-0263/ for details",
526+
"see https://peps.python.org/pep-0263/ for details",
527527
badchar, tok->filename, tok->lineno + 1);
528528
return 0;
529529
}

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ If you have a proposal to change Python, you may want to send an email to the
228228
`comp.lang.python`_ or `python-ideas`_ mailing lists for initial feedback. A
229229
Python Enhancement Proposal (PEP) may be submitted if your idea gains ground.
230230
All current PEPs, as well as guidelines for submitting a new PEP, are listed at
231-
`python.org/dev/peps/ <https://www.python.org/dev/peps/>`_.
231+
`peps.python.org <https://peps.python.org/>`_.
232232

233233
.. _python-ideas: https://mail.python.org/mailman/listinfo/python-ideas/
234234
.. _comp.lang.python: https://mail.python.org/mailman/listinfo/python-list

Tools/scripts/stable_abi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ def main():
656656
657657
And in PEP 384:
658658
659-
https://www.python.org/dev/peps/pep-0384/
659+
https://peps.python.org/pep-0384/
660660
""")
661661

662662

0 commit comments

Comments
 (0)
0