diff --git a/Doc/c-api/code.rst b/Doc/c-api/code.rst index 2b0cdf43243..840b8426dbb 100644 --- a/Doc/c-api/code.rst +++ b/Doc/c-api/code.rst @@ -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 - `_. + `_. .. c:function:: int PyCode_Addr2Location(PyObject *co, int byte_offset, int *start_line, int *start_column, int *end_line, int *end_column) diff --git a/Doc/conf.py b/Doc/conf.py index cbf201a314e..1aadd961b6e 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -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 diff --git a/Doc/distutils/sourcedist.rst b/Doc/distutils/sourcedist.rst index 7b1e22f824e..b55d01157f3 100644 --- a/Doc/distutils/sourcedist.rst +++ b/Doc/distutils/sourcedist.rst @@ -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 `_; + deprecated by `PEP 527 `_; `PyPI `_ only accepts ``.zip`` and ``.tar.gz`` files. When using any ``tar`` format (``gztar``, ``bztar``, ``xztar``, ``ztar`` or diff --git a/Doc/faq/general.rst b/Doc/faq/general.rst index 7723114bcc1..99534c2ebf6 100644 --- a/Doc/faq/general.rst +++ b/Doc/faq/general.rst @@ -310,7 +310,7 @@ The latest stable releases can always be found on the `Python download page `_. 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 `_. +maintained anymore `_. 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 diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst index 6486ed4f216..b10aa7cd50d 100644 --- a/Doc/library/ast.rst +++ b/Doc/library/ast.rst @@ -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 - `_. + `_. * ``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. diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst index c78818bfab1..e23946a0a45 100644 --- a/Doc/library/functools.rst +++ b/Doc/library/functools.rst @@ -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() diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index a1a7e1bd49e..e70d038e61d 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -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 diff --git a/Doc/requirements.txt b/Doc/requirements.txt index 3b28495d4b4..f8a7f9db144 100644 --- a/Doc/requirements.txt +++ b/Doc/requirements.txt @@ -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 diff --git a/Doc/tools/templates/indexsidebar.html b/Doc/tools/templates/indexsidebar.html index f7bf6d8e491..5986204256f 100644 --- a/Doc/tools/templates/indexsidebar.html +++ b/Doc/tools/templates/indexsidebar.html @@ -10,7 +10,7 @@

{% trans %}Other resources{% endtrans %}

    {# XXX: many of these should probably be merged in the main docs #} -
  • {% trans %}PEP Index{% endtrans %}
  • +
  • {% trans %}PEP Index{% endtrans %}
  • {% trans %}Beginner's Guide{% endtrans %}
  • {% trans %}Book List{% endtrans %}
  • {% trans %}Audio/Visual Talks{% endtrans %}
  • diff --git a/Doc/whatsnew/2.0.rst b/Doc/whatsnew/2.0.rst index 0e1cf1fd0ce..325def51c27 100644 --- a/Doc/whatsnew/2.0.rst +++ b/Doc/whatsnew/2.0.rst @@ -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". diff --git a/Doc/whatsnew/2.7.rst b/Doc/whatsnew/2.7.rst index abb65222ddd..999f148fa6b 100644 --- a/Doc/whatsnew/2.7.rst +++ b/Doc/whatsnew/2.7.rst @@ -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 diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst index 0405f2ba193..f4ff1432241 100644 --- a/Doc/whatsnew/3.4.rst +++ b/Doc/whatsnew/3.4.rst @@ -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:: diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index 5ce637a6c12..49246be5763 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -353,7 +353,7 @@ module: The new functions return the number of nanoseconds as an integer value. -`Measurements `_ +`Measurements `_ show that on Linux and Windows the resolution of :func:`time.time_ns` is approximately 3 times better than that of :func:`time.time`. diff --git a/Lib/dataclasses.py b/Lib/dataclasses.py index 6be7c7b5de9..1acb7128f1a 100644 --- a/Lib/dataclasses.py +++ b/Lib/dataclasses.py @@ -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 diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index 1a9bd1200f8..f287b349984 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -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') diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 18b476ee660..12c2bb450e4 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -701,10 +701,10 @@ class HTMLDoc(Doc): url = escape(all).replace('"', '"') results.append('%s' % (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('%s' % (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('%s' % (url, escape(all))) elif selfdot: # Create a link for methods like 'self.method(...)' diff --git a/Lib/secrets.py b/Lib/secrets.py index a546efbdd42..900381a89f5 100644 --- a/Lib/secrets.py +++ b/Lib/secrets.py @@ -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/ """ diff --git a/Lib/test/test_docxmlrpc.py b/Lib/test/test_docxmlrpc.py index 89d80091850..2ad422079b7 100644 --- a/Lib/test/test_docxmlrpc.py +++ b/Lib/test/test_docxmlrpc.py @@ -146,9 +146,9 @@ class DocXMLRPCHTTPGETServer(unittest.TestCase): self.assertIn( (b'
    add(x, y)
    ' b'Add two instances together. This ' - b'follows ' + b'follows ' b'PEP008, but has nothing
    \nto do ' - b'with ' + b'with ' b'RFC1952. Case should matter: pEp008 ' b'and rFC1952.  Things
    \nthat start ' b'with http and ftp should be ' diff --git a/Lib/weakref.py b/Lib/weakref.py index 994ea8aa37d..42aba654de5 100644 --- a/Lib/weakref.py +++ b/Lib/weakref.py @@ -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; diff --git a/Lib/xmlrpc/server.py b/Lib/xmlrpc/server.py index 4228a8535bf..0c4b558045a 100644 --- a/Lib/xmlrpc/server.py +++ b/Lib/xmlrpc/server.py @@ -731,10 +731,10 @@ class ServerHTMLDoc(pydoc.HTMLDoc): url = escape(all).replace('"', '"') results.append('%s' % (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('%s' % (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('%s' % (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 index 00000000000..4cbd0154eac --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2022-03-26-12-20-16.bpo-47126.p6_Ovm.rst @@ -0,0 +1 @@ +Update PEP URLs to :pep:`676`'s new canonical form. diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index 0941bcaaecc..13116d052ea 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -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; } diff --git a/README.rst b/README.rst index 2b1bfadcccf..d5cf8205c6b 100644 --- a/README.rst +++ b/README.rst @@ -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/ `_. +`peps.python.org `_. .. _python-ideas: https://mail.python.org/mailman/listinfo/python-ideas/ .. _comp.lang.python: https://mail.python.org/mailman/listinfo/python-list diff --git a/Tools/scripts/stable_abi.py b/Tools/scripts/stable_abi.py index 04b1f78e00a..2d951788d12 100755 --- a/Tools/scripts/stable_abi.py +++ b/Tools/scripts/stable_abi.py @@ -656,7 +656,7 @@ def main(): And in PEP 384: - https://www.python.org/dev/peps/pep-0384/ + https://peps.python.org/pep-0384/ """)