Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-47126: Update to canonical PEP URLs #32124

Merged
merged 4 commits into from
Mar 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/c-api/code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ bound into a function.
If you just need the line number of a frame, use :c:func:`PyFrame_GetLineNumber` instead.

For efficiently iterating over the line numbers in a code object, use `the API described in PEP 626
<https://www.python.org/dev/peps/pep-0626/#out-of-process-debuggers-and-profilers>`_.
<https://peps.python.org/pep-0626/#out-of-process-debuggers-and-profilers>`_.

.. c:function:: int PyCode_Addr2Location(PyObject *co, int byte_offset, int *start_line, int *start_column, int *end_line, int *end_column)

Expand Down
4 changes: 1 addition & 3 deletions Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,7 @@
# ----------------------------

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


# Options for extensions
Expand Down
2 changes: 1 addition & 1 deletion Doc/distutils/sourcedist.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Notes:
requires the :program:`compress` program. Notice that this format is now
pending for deprecation and will be removed in the future versions of Python.
(5)
deprecated by `PEP 527 <https://www.python.org/dev/peps/pep-0527/>`_;
deprecated by `PEP 527 <https://peps.python.org/pep-0527/>`_;
`PyPI <https://pypi.org>`_ only accepts ``.zip`` and ``.tar.gz`` files.

When using any ``tar`` format (``gztar``, ``bztar``, ``xztar``, ``ztar`` or
Expand Down
4 changes: 2 additions & 2 deletions Doc/faq/general.rst
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ The latest stable releases can always be found on the `Python download page
<https://www.python.org/downloads/>`_. There are two production-ready versions
of Python: 2.x and 3.x. The recommended version is 3.x, which is supported by
most widely used libraries. Although 2.x is still widely used, `it is not
maintained anymore <https://www.python.org/dev/peps/pep-0373/>`_.
maintained anymore <https://peps.python.org/pep-0373/>`_.

How many people are using Python?
---------------------------------
Expand Down Expand Up @@ -345,7 +345,7 @@ include Google, Yahoo, and Lucasfilm Ltd.
What new developments are expected for Python in the future?
------------------------------------------------------------

See https://www.python.org/dev/peps/ for the Python Enhancement Proposals
See https://peps.python.org/ for the Python Enhancement Proposals
(PEPs). PEPs are design documents describing a suggested new feature for Python,
providing a concise technical specification and a rationale. Look for a PEP
titled "Python X.Y Release Schedule", where X.Y is a version that hasn't been
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/ast.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1826,7 +1826,7 @@ Function and class definitions
* ``bases`` is a list of nodes for explicitly specified base classes.
* ``keywords`` is a list of :class:`keyword` nodes, principally for 'metaclass'.
Other keywords will be passed to the metaclass, as per `PEP-3115
<https://www.python.org/dev/peps/pep-3115/>`_.
<https://peps.python.org/pep-3115/>`_.
* ``starargs`` and ``kwargs`` are each a single node, as in a function call.
starargs will be expanded to join the list of base classes, and kwargs will
be passed to the metaclass.
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/functools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ The :mod:`functools` module defines the following functions:
@lru_cache(maxsize=32)
def get_pep(num):
'Retrieve text of a Python Enhancement Proposal'
resource = 'https://www.python.org/dev/peps/pep-%04d/' % num
resource = 'https://peps.python.org/pep-%04d/' % num
try:
with urllib.request.urlopen(resource) as s:
return s.read()
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/sqlite3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ Module functions and constants
| | | | connections and cursors |
+------------------+-----------------+----------------------+-------------------------------+

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

.. versionchanged:: 3.11
Expand Down
2 changes: 1 addition & 1 deletion Doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Sphinx version is pinned so that new versions that introduce new warnings
# won't suddenly cause build failures. Updating the version is fine as long
# as no warnings are raised by doing so.
sphinx==4.2.0
sphinx==4.5.0

blurb

Expand Down
2 changes: 1 addition & 1 deletion Doc/tools/templates/indexsidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h3>{% trans %}Docs by version{% endtrans %}</h3>
<h3>{% trans %}Other resources{% endtrans %}</h3>
<ul>
{# XXX: many of these should probably be merged in the main docs #}
<li><a href="https://www.python.org/dev/peps/">{% trans %}PEP Index{% endtrans %}</a></li>
<li><a href="https://peps.python.org/">{% trans %}PEP Index{% endtrans %}</a></li>
<li><a href="https://wiki.python.org/moin/BeginnersGuide">{% trans %}Beginner's Guide{% endtrans %}</a></li>
<li><a href="https://wiki.python.org/moin/PythonBooks">{% trans %}Book List{% endtrans %}</a></li>
<li><a href="https://www.python.org/doc/av/">{% trans %}Audio/Visual Talks{% endtrans %}</a></li>
Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/2.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Guidelines":
Read the rest of :pep:`1` for the details of the PEP editorial process, style, and
format. PEPs are kept in the Python CVS tree on SourceForge, though they're not
part of the Python 2.0 distribution, and are also available in HTML form from
https://www.python.org/dev/peps/. As of September 2000, there are 25 PEPS, ranging
https://peps.python.org/. As of September 2000, there are 25 PEPS, ranging
from :pep:`201`, "Lockstep Iteration", to PEP 225, "Elementwise/Objectwise
Operators".

Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/2.7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2681,7 +2681,7 @@ these commands by default, as long as, when invoked, they provide clear and
simple directions on how to install them on that platform (usually using
the system package manager).

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


Documentation Changes
Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ these commands by default, as long as, when invoked, they provide clear and
simple directions on how to install them on that platform (usually using
the system package manager).

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

.. note::

Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ module:

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

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

Expand Down
2 changes: 1 addition & 1 deletion Lib/dataclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def __repr__(self):
# This is used to support the PEP 487 __set_name__ protocol in the
# case where we're using a field that contains a descriptor as a
# default value. For details on __set_name__, see
# https://www.python.org/dev/peps/pep-0487/#implementation-details.
# https://peps.python.org/pep-0487/#implementation-details.
#
# Note that in _process_class, this Field object is overwritten
# with the default value, so the end result is a descriptor that
Expand Down
2 changes: 1 addition & 1 deletion Lib/distutils/command/build_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ def get_export_symbols(self, ext):
suffix = '_' + ext.name.split('.')[-1]
try:
# Unicode module name support as defined in PEP-489
# https://www.python.org/dev/peps/pep-0489/#export-hook-name
# https://peps.python.org/pep-0489/#export-hook-name
suffix.encode('ascii')
except UnicodeEncodeError:
suffix = 'U' + suffix.encode('punycode').replace(b'-', b'_').decode('ascii')
Expand Down
4 changes: 2 additions & 2 deletions Lib/pydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,10 +694,10 @@ def markup(self, text, escape=None, funcs={}, classes={}, methods={}):
url = escape(all).replace('"', '&quot;')
results.append('<a href="%s">%s</a>' % (url, url))
elif rfc:
url = 'http://www.rfc-editor.org/rfc/rfc%d.txt' % int(rfc)
url = 'https://www.rfc-editor.org/rfc/rfc%d.txt' % int(rfc)
results.append('<a href="%s">%s</a>' % (url, escape(all)))
elif pep:
url = 'https://www.python.org/dev/peps/pep-%04d/' % int(pep)
url = 'https://peps.python.org/pep-%04d/' % int(pep)
results.append('<a href="%s">%s</a>' % (url, escape(all)))
elif selfdot:
# Create a link for methods like 'self.method(...)'
Expand Down
2 changes: 1 addition & 1 deletion Lib/secrets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
managing secrets such as account authentication, tokens, and similar.

See PEP 506 for more information.
https://www.python.org/dev/peps/pep-0506/
https://peps.python.org/pep-0506/

"""

Expand Down
4 changes: 2 additions & 2 deletions Lib/test/test_docxmlrpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ def test_autolinking(self):
self.assertIn(
(b'<dl><dt><a name="-add"><strong>add</strong></a>(x, y)</dt><dd>'
b'<tt>Add&nbsp;two&nbsp;instances&nbsp;together.&nbsp;This&nbsp;'
b'follows&nbsp;<a href="https://www.python.org/dev/peps/pep-0008/">'
b'follows&nbsp;<a href="https://peps.python.org/pep-0008/">'
b'PEP008</a>,&nbsp;but&nbsp;has&nbsp;nothing<br>\nto&nbsp;do&nbsp;'
b'with&nbsp;<a href="http://www.rfc-editor.org/rfc/rfc1952.txt">'
b'with&nbsp;<a href="https://www.rfc-editor.org/rfc/rfc1952.txt">'
b'RFC1952</a>.&nbsp;Case&nbsp;should&nbsp;matter:&nbsp;pEp008&nbsp;'
b'and&nbsp;rFC1952.&nbsp;&nbsp;Things<br>\nthat&nbsp;start&nbsp;'
b'with&nbsp;http&nbsp;and&nbsp;ftp&nbsp;should&nbsp;be&nbsp;'
Expand Down
2 changes: 1 addition & 1 deletion Lib/weakref.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This module is an implementation of PEP 205:

https://www.python.org/dev/peps/pep-0205/
https://peps.python.org/pep-0205/
"""

# Naming convention: Variables named "wr" are weak reference objects;
Expand Down
4 changes: 2 additions & 2 deletions Lib/xmlrpc/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,10 +731,10 @@ def markup(self, text, escape=None, funcs={}, classes={}, methods={}):
url = escape(all).replace('"', '&quot;')
results.append('<a href="%s">%s</a>' % (url, url))
elif rfc:
url = 'http://www.rfc-editor.org/rfc/rfc%d.txt' % int(rfc)
url = 'https://www.rfc-editor.org/rfc/rfc%d.txt' % int(rfc)
results.append('<a href="%s">%s</a>' % (url, escape(all)))
elif pep:
url = 'https://www.python.org/dev/peps/pep-%04d/' % int(pep)
url = 'https://peps.python.org/pep-%04d/' % int(pep)
results.append('<a href="%s">%s</a>' % (url, escape(all)))
elif text[end:end+1] == '(':
results.append(self.namelink(name, methods, funcs, classes))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update PEP URLs to :pep:`676`'s new canonical form.
2 changes: 1 addition & 1 deletion Parser/tokenizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ ensure_utf8(char *line, struct tok_state *tok)
"Non-UTF-8 code starting with '\\x%.2x' "
"in file %U on line %i, "
"but no encoding declared; "
"see https://python.org/dev/peps/pep-0263/ for details",
"see https://peps.python.org/pep-0263/ for details",
badchar, tok->filename, tok->lineno + 1);
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ If you have a proposal to change Python, you may want to send an email to the
`comp.lang.python`_ or `python-ideas`_ mailing lists for initial feedback. A
Python Enhancement Proposal (PEP) may be submitted if your idea gains ground.
All current PEPs, as well as guidelines for submitting a new PEP, are listed at
`python.org/dev/peps/ <https://www.python.org/dev/peps/>`_.
`peps.python.org <https://peps.python.org/>`_.

.. _python-ideas: https://mail.python.org/mailman/listinfo/python-ideas/
.. _comp.lang.python: https://mail.python.org/mailman/listinfo/python-list
Expand Down
2 changes: 1 addition & 1 deletion Tools/scripts/stable_abi.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ def main():

And in PEP 384:

https://www.python.org/dev/peps/pep-0384/
https://peps.python.org/pep-0384/
""")


Expand Down