]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-47126: Update to canonical PEP URLs specified by PEP 676 (GH-32124)
authorHugo van Kemenade <hugovk@users.noreply.github.com>
Wed, 30 Mar 2022 11:00:27 +0000 (14:00 +0300)
committerGitHub <noreply@github.com>
Wed, 30 Mar 2022 11:00:27 +0000 (12:00 +0100)
24 files changed:
Doc/c-api/code.rst
Doc/conf.py
Doc/distutils/sourcedist.rst
Doc/faq/general.rst
Doc/library/ast.rst
Doc/library/functools.rst
Doc/library/sqlite3.rst
Doc/requirements.txt
Doc/tools/templates/indexsidebar.html
Doc/whatsnew/2.0.rst
Doc/whatsnew/2.7.rst
Doc/whatsnew/3.4.rst
Doc/whatsnew/3.7.rst
Lib/dataclasses.py
Lib/distutils/command/build_ext.py
Lib/pydoc.py
Lib/secrets.py
Lib/test/test_docxmlrpc.py
Lib/weakref.py
Lib/xmlrpc/server.py
Misc/NEWS.d/next/Documentation/2022-03-26-12-20-16.bpo-47126.p6_Ovm.rst [new file with mode: 0644]
Parser/tokenizer.c
README.rst
Tools/scripts/stable_abi.py

index 2b0cdf43243405ba049954e690c7aa882dd2aa6a..840b8426dbbdc325348bcb6482a27dcf6622500a 100644 (file)
@@ -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)
 
index cbf201a314eec75ac85f7c08732f2a17d9696bea..1aadd961b6ef0fb9d8a087b7e6d27a41943c1bb6 100644 (file)
@@ -218,9 +218,7 @@ coverage_ignore_c_items = {
 # ----------------------------
 
 # 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
index 7b1e22f824e8ce02feb6a958b6d3daee33467e41..b55d01157f3ee10561c236e8b22faf29cc80ab68 100644 (file)
@@ -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
index 7723114bcc18d39209770616c9de289e03fe1d13..99534c2ebf6e1c6347a367d5a2b3735beb00e5d8 100644 (file)
@@ -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?
 ---------------------------------
@@ -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
index 6486ed4f2169678716958f121ed35d1dfe0c2802..b10aa7cd50d17300881888da32abf392800b028a 100644 (file)
@@ -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.
index c78818bfab1a51c1cd946b825eb317c2c4dcb0a8..e23946a0a45e75dac0e5b324a85eccfac40e95aa 100644 (file)
@@ -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()
index a1a7e1bd49e8e73a357d630590347d46e0892453..e70d038e61d82d2b2e349127ad79a34438376875 100644 (file)
@@ -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
index 3b28495d4b4d0472cb2161cd8de79534bd65cfa4..f8a7f9db144c211cf971859492bdc1f71db7033d 100644 (file)
@@ -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
 
index f7bf6d8e491172621e949f9912e6098770b980a6..5986204256f4bc49979602b95a4428b208437d7c 100644 (file)
@@ -10,7 +10,7 @@
 <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>
index 0e1cf1fd0ce46c17f4010d3bea47f2a8b7599aea..325def51c274e0cf5cbaef3f1bf33961a5d0f8a5 100644 (file)
@@ -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".
 
index abb65222ddd3d03d5a364230edc0342b08cfcb53..999f148fa6b795ff1315d53275510aede09159cc 100644 (file)
@@ -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
index 0405f2ba1934667a0f107aa7cd98beb0377cadb3..f4ff143224196bc1a310304d2474fb4ad8f78020 100644 (file)
@@ -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::
 
index 5ce637a6c12c12d691ce3b5026b8627b9fa6ab8c..49246be57639d1059dc710658314dbfb92d57867 100644 (file)
@@ -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`.
 
index 6be7c7b5de917f1808c84cfd457ccf51b1a7e973..1acb7128f1a0c87f58a9007dab6196c742ee0495 100644 (file)
@@ -298,7 +298,7 @@ class Field:
     # 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
index 1a9bd1200f82358c5a758c69c433bb55621e157e..f287b349984ff0c658cd62192e85604bc4f848a9 100644 (file)
@@ -692,7 +692,7 @@ class build_ext(Command):
         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')
index 18b476ee660dc6a3fd2d6a230ee8bd3f0b856668..12c2bb450e4f51b7937dda805e0ff2fb6eb25fc4 100755 (executable)
@@ -701,10 +701,10 @@ class HTMLDoc(Doc):
                 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(...)'
index a546efbdd4204c81d0a8d8917dc539380fa77070..900381a89f53ec44b5b0a7e8e4481fce2ab931ad 100644 (file)
@@ -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/
 
 """
 
index 89d80091850f5e6bfec022fc6a71d71320774f70..2ad422079b7f23e7b3088d9bd9a949565bd569eb 100644 (file)
@@ -146,9 +146,9 @@ class DocXMLRPCHTTPGETServer(unittest.TestCase):
         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;'
index 994ea8aa37de583809b01f82d16ca47dbb1cec8a..42aba654de54989fd415bd00818adaf4e4eb6199 100644 (file)
@@ -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;
index 4228a8535bfba857f4f91124680f07c208e80d1a..0c4b558045a9f43b022f4c025063a47f7b4caff3 100644 (file)
@@ -731,10 +731,10 @@ class ServerHTMLDoc(pydoc.HTMLDoc):
                 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))
diff --git a/Misc/NEWS.d/next/Documentation/2022-03-26-12-20-16.bpo-47126.p6_Ovm.rst b/Misc/NEWS.d/next/Documentation/2022-03-26-12-20-16.bpo-47126.p6_Ovm.rst
new file mode 100644 (file)
index 0000000..4cbd015
--- /dev/null
@@ -0,0 +1 @@
+Update PEP URLs to :pep:`676`'s new canonical form.
index 0941bcaaecc62774c488fbefa41539cb8e0a1c4f..13116d052ea593c32e73b5ce0d58394ff057a557 100644 (file)
@@ -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;
     }
index 2b1bfadcccfa036c72b6a9579aed2112fc052562..d5cf8205c6b886c436754f9d496c4df21bac1751 100644 (file)
@@ -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
index 04b1f78e00adb5551ce0c1d32fa33da90415cb68..2d951788d12c4ba03db26551d5cccef8100c9ec2 100755 (executable)
@@ -656,7 +656,7 @@ def main():
 
         And in PEP 384:
 
-        https://www.python.org/dev/peps/pep-0384/
+        https://peps.python.org/pep-0384/
         """)