From 8a6b0834941fb8774c86882e2edc33285c85b33a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Wirtel?= Date: Mon, 22 Oct 2018 10:11:31 +0200 Subject: [PATCH 1/4] bpo-35042: Use the :pep: role where a PEP is specified --- Doc/c-api/intro.rst | 2 +- Doc/c-api/module.rst | 6 +++--- Doc/distutils/apiref.rst | 4 ++-- Doc/extending/extending.rst | 2 +- Doc/howto/clinic.rst | 2 +- Doc/library/abc.rst | 2 +- Doc/library/pkgutil.rst | 16 ++++++++-------- Doc/library/py_compile.rst | 2 +- Doc/library/test.rst | 2 +- Doc/library/typing.rst | 2 +- Doc/library/wsgiref.rst | 4 ++-- Doc/library/zipimport.rst | 4 ++-- Doc/whatsnew/2.0.rst | 6 +++--- Doc/whatsnew/2.1.rst | 10 +++++----- Doc/whatsnew/2.5.rst | 8 ++++---- Doc/whatsnew/3.3.rst | 8 ++++---- Doc/whatsnew/3.5.rst | 2 +- Misc/NEWS.d/3.5.0a1.rst | 6 +++--- Misc/NEWS.d/3.5.0a2.rst | 4 ++-- Misc/NEWS.d/3.5.0a4.rst | 6 +++--- Misc/NEWS.d/3.5.0b2.rst | 2 +- Misc/NEWS.d/3.5.0b3.rst | 2 +- Misc/NEWS.d/3.5.0b4.rst | 2 +- Misc/NEWS.d/3.5.0rc3.rst | 2 +- Misc/NEWS.d/3.5.2rc1.rst | 6 +++--- Misc/NEWS.d/3.5.3rc1.rst | 2 +- Misc/NEWS.d/3.6.0a1.rst | 8 ++++---- Misc/NEWS.d/3.6.0a2.rst | 14 +++++++------- Misc/NEWS.d/3.6.0a3.rst | 2 +- Misc/NEWS.d/3.6.0a4.rst | 10 +++++----- Misc/NEWS.d/3.6.0b1.rst | 12 ++++++------ Misc/NEWS.d/3.6.0rc1.rst | 2 +- Misc/NEWS.d/3.6.1rc1.rst | 4 ++-- Misc/NEWS.d/3.6.3rc1.rst | 4 ++-- Misc/NEWS.d/3.6.6rc1.rst | 2 +- Misc/NEWS.d/3.7.0a1.rst | 12 ++++++------ Misc/NEWS.d/3.7.0a2.rst | 4 ++-- Misc/NEWS.d/3.7.0a3.rst | 2 +- Misc/NEWS.d/3.7.0b4.rst | 2 +- Misc/NEWS.d/3.7.0b5.rst | 2 +- Misc/NEWS.d/3.7.0rc1.rst | 2 +- .../2018-05-23-11-59-51.bpo-32436.S1LGPa.rst | 2 +- .../2018-06-08-23-46-01.bpo-33409.r4z9MM.rst | 2 +- .../2018-04-04-23-41-30.bpo-33224.pyR0jB.rst | 2 +- 44 files changed, 101 insertions(+), 101 deletions(-) diff --git a/Doc/c-api/intro.rst b/Doc/c-api/intro.rst index 15006100c7366a..3d2c5561569cc3 100644 --- a/Doc/c-api/intro.rst +++ b/Doc/c-api/intro.rst @@ -34,7 +34,7 @@ Coding standards ================ If you're writing C code for inclusion in CPython, you **must** follow the -guidelines and standards defined in :PEP:`7`. These guidelines apply +guidelines and standards defined in :pep:`7`. These guidelines apply regardless of the version of Python you are contributing to. Following these conventions is not necessary for your own third party extension modules, unless you eventually expect to contribute them to Python. diff --git a/Doc/c-api/module.rst b/Doc/c-api/module.rst index 017b656854a8cd..149ac64e728e7e 100644 --- a/Doc/c-api/module.rst +++ b/Doc/c-api/module.rst @@ -173,7 +173,7 @@ or request "multi-phase initialization" by returning the definition struct itsel for its state. Non-negative ``m_size`` is required for multi-phase initialization. - See :PEP:`3121` for more details. + See :pep:`3121` for more details. .. c:member:: PyMethodDef* m_methods @@ -309,7 +309,7 @@ The available slot types are: .. c:function:: PyObject* create_module(PyObject *spec, PyModuleDef *def) The function receives a :py:class:`~importlib.machinery.ModuleSpec` - instance, as defined in :PEP:`451`, and the module definition. + instance, as defined in :pep:`451`, and the module definition. It should return a new module object, or set an error and return *NULL*. @@ -345,7 +345,7 @@ The available slot types are: If multiple ``Py_mod_exec`` slots are specified, they are processed in the order they appear in the *m_slots* array. -See :PEP:`489` for more details on multi-phase initialization. +See :pep:`489` for more details on multi-phase initialization. Low-level module creation functions ................................... diff --git a/Doc/distutils/apiref.rst b/Doc/distutils/apiref.rst index 3c89468220a4dc..4a87a7c05f6e16 100644 --- a/Doc/distutils/apiref.rst +++ b/Doc/distutils/apiref.rst @@ -1393,11 +1393,11 @@ This module provides the :class:`FileList` class, used for poking about the filesystem and building lists of files. -:mod:`distutils.log` --- Simple PEP 282-style logging +:mod:`distutils.log` --- Simple :pep:`282`-style logging ===================================================== .. module:: distutils.log - :synopsis: A simple logging mechanism, 282-style + :synopsis: A simple logging mechanism, :pep:`282`-style :mod:`distutils.spawn` --- Spawn a sub-process diff --git a/Doc/extending/extending.rst b/Doc/extending/extending.rst index 82b689e064c1d5..9d46708df5d3c0 100644 --- a/Doc/extending/extending.rst +++ b/Doc/extending/extending.rst @@ -421,7 +421,7 @@ read as an example. Unlike our ``spam`` example, ``xxmodule`` uses *multi-phase initialization* (new in Python 3.5), where a PyModuleDef structure is returned from ``PyInit_spam``, and creation of the module is left to the import machinery. - For details on multi-phase initialization, see :PEP:`489`. + For details on multi-phase initialization, see :pep:`489`. .. _compilation: diff --git a/Doc/howto/clinic.rst b/Doc/howto/clinic.rst index c75c31c9831903..5b2457a1682bc6 100644 --- a/Doc/howto/clinic.rst +++ b/Doc/howto/clinic.rst @@ -765,7 +765,7 @@ All Argument Clinic converters accept the following arguments: ``annotation`` The annotation value for this parameter. Not currently supported, - because PEP 8 mandates that the Python library may not use + because :pep:`8` mandates that the Python library may not use annotations. In addition, some converters accept additional arguments. Here is a list diff --git a/Doc/library/abc.rst b/Doc/library/abc.rst index 70710761a39555..2aba02f8cb4913 100644 --- a/Doc/library/abc.rst +++ b/Doc/library/abc.rst @@ -2,7 +2,7 @@ ==================================== .. module:: abc - :synopsis: Abstract base classes according to PEP 3119. + :synopsis: Abstract base classes according to :pep:`3119`. .. moduleauthor:: Guido van Rossum .. sectionauthor:: Georg Brandl diff --git a/Doc/library/pkgutil.rst b/Doc/library/pkgutil.rst index fba0ea641d9279..78a51573458583 100644 --- a/Doc/library/pkgutil.rst +++ b/Doc/library/pkgutil.rst @@ -63,7 +63,7 @@ support. .. deprecated:: 3.3 This emulation is no longer needed, as the standard import mechanism - is now fully PEP 302 compliant and available in :mod:`importlib`. + is now fully :pep:`302` compliant and available in :mod:`importlib`. .. class:: ImpLoader(fullname, file, filename, etc) @@ -72,7 +72,7 @@ support. .. deprecated:: 3.3 This emulation is no longer needed, as the standard import mechanism - is now fully PEP 302 compliant and available in :mod:`importlib`. + is now fully :pep:`302` compliant and available in :mod:`importlib`. .. function:: find_loader(fullname) @@ -86,7 +86,7 @@ support. .. versionchanged:: 3.3 Updated to be based directly on :mod:`importlib` rather than relying - on the package internal PEP 302 import emulation. + on the package internal :pep:`302` import emulation. .. versionchanged:: 3.4 Updated to be based on :pep:`451` @@ -103,7 +103,7 @@ support. .. versionchanged:: 3.3 Updated to be based directly on :mod:`importlib` rather than relying - on the package internal PEP 302 import emulation. + on the package internal :pep:`302` import emulation. .. function:: get_loader(module_or_name) @@ -118,7 +118,7 @@ support. .. versionchanged:: 3.3 Updated to be based directly on :mod:`importlib` rather than relying - on the package internal PEP 302 import emulation. + on the package internal :pep:`302` import emulation. .. versionchanged:: 3.4 Updated to be based on :pep:`451` @@ -139,7 +139,7 @@ support. .. versionchanged:: 3.3 Updated to be based directly on :mod:`importlib` rather than relying - on the package internal PEP 302 import emulation. + on the package internal :pep:`302` import emulation. .. function:: iter_modules(path=None, prefix='') @@ -160,7 +160,7 @@ support. .. versionchanged:: 3.3 Updated to be based directly on :mod:`importlib` rather than relying - on the package internal PEP 302 import emulation. + on the package internal :pep:`302` import emulation. .. function:: walk_packages(path=None, prefix='', onerror=None) @@ -199,7 +199,7 @@ support. .. versionchanged:: 3.3 Updated to be based directly on :mod:`importlib` rather than relying - on the package internal PEP 302 import emulation. + on the package internal :pep:`302` import emulation. .. function:: get_data(package, resource) diff --git a/Doc/library/py_compile.rst b/Doc/library/py_compile.rst index 8cb5a4d546c874..c95d11db25e055 100644 --- a/Doc/library/py_compile.rst +++ b/Doc/library/py_compile.rst @@ -60,7 +60,7 @@ byte-code cache files in the directory containing the source code. the default is :attr:`PycInvalidationMode.TIMESTAMP`. .. versionchanged:: 3.2 - Changed default value of *cfile* to be :PEP:`3147`-compliant. Previous + Changed default value of *cfile* to be :pep:`3147`-compliant. Previous default was *file* + ``'c'`` (``'o'`` if optimization was enabled). Also added the *optimize* parameter. diff --git a/Doc/library/test.rst b/Doc/library/test.rst index 95d7f54ba44253..6a10babe259c9a 100644 --- a/Doc/library/test.rst +++ b/Doc/library/test.rst @@ -392,7 +392,7 @@ The :mod:`test.support` module defines the following functions: .. function:: make_legacy_pyc(source) - Move a PEP 3147/488 pyc file to its legacy pyc location and return the file + Move a :pep:`3147`/:pep:`488` pyc file to its legacy pyc location and return the file system path to the legacy pyc file. The *source* value is the file system path to the source file. It does not need to exist, however the PEP 3147/488 pyc file must exist. diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 268adc0c9de5bc..1a9872e7132c7d 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -2,7 +2,7 @@ ======================================== .. module:: typing - :synopsis: Support for type hints (see PEP 484). + :synopsis: Support for type hints (see :pep:`484`). .. versionadded:: 3.5 diff --git a/Doc/library/wsgiref.rst b/Doc/library/wsgiref.rst index e0f745f810b9ce..0dc7c11a5758ff 100644 --- a/Doc/library/wsgiref.rst +++ b/Doc/library/wsgiref.rst @@ -739,7 +739,7 @@ input, output, and error streams. .. function:: read_environ() - Transcode CGI variables from ``os.environ`` to PEP 3333 "bytes in unicode" + Transcode CGI variables from ``os.environ`` to :pep:`3333` "bytes in unicode" strings, returning a new dictionary. This function is used by :class:`CGIHandler` and :class:`IISCGIHandler` in place of directly using ``os.environ``, which is not necessarily WSGI-compliant on all platforms @@ -767,7 +767,7 @@ This is a working "Hello World" WSGI application:: # use a function (note that you're not limited to a function, you can # use a class for example). The first argument passed to the function # is a dictionary containing CGI-style environment variables and the - # second variable is the callable object (see PEP 333). + # second variable is the callable object (see :pep:`333`). def hello_world_app(environ, start_response): status = '200 OK' # HTTP Status headers = [('Content-type', 'text/plain; charset=utf-8')] # HTTP Headers diff --git a/Doc/library/zipimport.rst b/Doc/library/zipimport.rst index 4fbd0e863c537e..aa1831dbc60de9 100644 --- a/Doc/library/zipimport.rst +++ b/Doc/library/zipimport.rst @@ -39,8 +39,8 @@ doesn't contain :file:`.pyc` files, importing may be rather slow. :pep:`273` - Import Modules from Zip Archives Written by James C. Ahlstrom, who also provided an implementation. Python 2.3 - follows the specification in PEP 273, but uses an implementation written by Just - van Rossum that uses the import hooks described in PEP 302. + follows the specification in :pep:`273`, but uses an implementation written by Just + van Rossum that uses the import hooks described in :pep:`302`. :pep:`302` - New Import Hooks The PEP to add the import hooks that help this module work. diff --git a/Doc/whatsnew/2.0.rst b/Doc/whatsnew/2.0.rst index 5cbf50112385f4..8c740eefb0983f 100644 --- a/Doc/whatsnew/2.0.rst +++ b/Doc/whatsnew/2.0.rst @@ -111,7 +111,7 @@ python-dev. Therefore, a relatively formal process has been set up to write Python Enhancement Proposals (PEPs), modelled on the Internet RFC process. PEPs are draft documents that describe a proposed new feature, and are continually revised until the community reaches a consensus, either accepting or rejecting -the proposal. Quoting from the introduction to PEP 1, "PEP Purpose and +the proposal. Quoting from the introduction to :pep:`1`, "PEP Purpose and Guidelines": @@ -127,11 +127,11 @@ Guidelines": that have gone into Python. The PEP author is responsible for building consensus within the community and documenting dissenting opinions. -Read the rest of PEP 1 for the details of the PEP editorial process, style, and +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 -from PEP 201, "Lockstep Iteration", to PEP 225, "Elementwise/Objectwise +from :pep:`201`, "Lockstep Iteration", to PEP 225, "Elementwise/Objectwise Operators". .. ====================================================================== diff --git a/Doc/whatsnew/2.1.rst b/Doc/whatsnew/2.1.rst index 3486cddc05e9f4..12c028f24180f1 100644 --- a/Doc/whatsnew/2.1.rst +++ b/Doc/whatsnew/2.1.rst @@ -112,8 +112,8 @@ anyway). Compatibility concerns have led to nested scopes being introduced gradually; in Python 2.1, they aren't enabled by default, but can be turned on within a module -by using a future statement as described in PEP 236. (See the following section -for further discussion of PEP 236.) In Python 2.2, nested scopes will become +by using a future statement as described in :pep:`236`. (See the following section +for further discussion of :pep:`236`.) In Python 2.2, nested scopes will become the default and there will be no way to turn them off, but users will have had all of 2.1's lifetime to fix any breakage resulting from their introduction. @@ -213,7 +213,7 @@ otherwise it will call the appropriate method and can return any Python object. There are also corresponding changes of interest to C programmers; there's a new slot ``tp_richcmp`` in type objects and an API for performing a given rich -comparison. I won't cover the C API here, but will refer you to PEP 207, or to +comparison. I won't cover the C API here, but will refer you to :pep:`207`, or to 2.1's C API documentation, for the full list of related functions. @@ -548,7 +548,7 @@ registering software at the Vaults is optional, and many people don't bother. As a first small step toward fixing the problem, Python software packaged using the Distutils :command:`sdist` command will include a file named :file:`PKG-INFO` containing information about the package such as its name, -version, and author (metadata, in cataloguing terminology). PEP 241 contains +version, and author (metadata, in cataloguing terminology). :pep:`241` contains the full list of fields that can be present in the :file:`PKG-INFO` file. As people began to package their software using Python 2.1, more and more packages will include metadata, making it possible to build automated cataloguing systems @@ -561,7 +561,7 @@ package to a catalog server. You can start creating packages containing :file:`PKG-INFO` even if you're not using Python 2.1, since a new release of the Distutils will be made for users of earlier Python versions. Version 1.0.2 of the Distutils includes the changes -described in PEP 241, as well as various bugfixes and enhancements. It will be +described in :pep:`241`, as well as various bugfixes and enhancements. It will be available from the Distutils SIG at https://www.python.org/community/sigs/current/distutils-sig/. diff --git a/Doc/whatsnew/2.5.rst b/Doc/whatsnew/2.5.rst index 79c5a73dcf2b4d..d70b642058184f 100644 --- a/Doc/whatsnew/2.5.rst +++ b/Doc/whatsnew/2.5.rst @@ -256,7 +256,7 @@ Package uploading was implemented by Martin von Löwis and Richard Jones. PEP 328: Absolute and Relative Imports ====================================== -The simpler part of PEP 328 was implemented in Python 2.4: parentheses could now +The simpler part of :pep:`328` was implemented in Python 2.4: parentheses could now be used to enclose the names imported from a module using the ``from ... import ...`` statement, making it easier to import many different names. @@ -529,7 +529,7 @@ chance to run. The syntactic restriction that you couldn't mix :keyword:`yield` statements with a ``try...finally`` suite has therefore been removed. This seems like a minor bit of language trivia, but using generators and ``try...finally`` is actually necessary in order to implement the -:keyword:`with` statement described by PEP 343. I'll look at this new statement +:keyword:`with` statement described by :pep:`343`. I'll look at this new statement in the following section. Another even more esoteric effect of this change: previously, the @@ -1483,7 +1483,7 @@ complete list of changes, or look through the SVN logs for all the details. 2.4, so this completes the removal of the feature. * The :mod:`pkgutil` module, containing various utility functions for finding - packages, was enhanced to support PEP 302's import hooks and now also works for + packages, was enhanced to support :pep:`302`'s import hooks and now also works for packages stored in ZIP-format archives. (Contributed by Phillip J. Eby.) * The pybench benchmark suite by Marc-André Lemburg is now included in the @@ -2043,7 +2043,7 @@ between web servers and Python web applications and is described in :pep:`333`. The :mod:`wsgiref` package is a reference implementation of the WSGI specification. -.. XXX should this be in a PEP 333 section instead? +.. XXX should this be in a :pep:`333` section instead? The package includes a basic HTTP server that will run a WSGI application; this server is useful for debugging but isn't intended for production use. Setting diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst index 8862b37e062823..ea036840d6710c 100644 --- a/Doc/whatsnew/3.3.rst +++ b/Doc/whatsnew/3.3.rst @@ -217,7 +217,7 @@ exist in parallel; over time, this compatibility should be phased out. On the Python side, there should be no downside to this change. -On the C API side, PEP 393 is fully backward compatible. The legacy API +On the C API side, :pep:`393` is fully backward compatible. The legacy API should remain available at least five years. Applications using the legacy API will not fully benefit of the memory reduction, or - worse - may use a bit more memory, because Python may have to maintain two versions of each @@ -2082,7 +2082,7 @@ Add a new :class:`types.MappingProxyType` class: Read-only proxy of a mapping. The new functions :func:`types.new_class` and :func:`types.prepare_class` provide support -for PEP 3115 compliant dynamic type creation. (:issue:`14588`) +for :pep:`3115` compliant dynamic type creation. (:issue:`14588`) unittest @@ -2396,7 +2396,7 @@ Porting Python code case of working with :term:`path entry finders `. * :mod:`pkgutil` has been converted to use :mod:`importlib` internally. This - eliminates many edge cases where the old behaviour of the PEP 302 import + eliminates many edge cases where the old behaviour of the :pep:`302` import emulation failed to match the behaviour of the real import system. The import emulation itself is still present, but is now deprecated. The :func:`pkgutil.iter_importers` and :func:`pkgutil.walk_packages` functions @@ -2472,7 +2472,7 @@ Porting C code functions using this type are deprecated (but will stay available for at least five years). If you were using low-level Unicode APIs to construct and access unicode objects and you want to benefit of the - memory footprint reduction provided by PEP 393, you have to convert + memory footprint reduction provided by :pep:`393`, you have to convert your code to the new :doc:`Unicode API <../c-api/unicode>`. However, if you only have been using high-level functions such as diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst index 4eddf841dcbec2..91387a102c8cda 100644 --- a/Doc/whatsnew/3.5.rst +++ b/Doc/whatsnew/3.5.rst @@ -2282,7 +2282,7 @@ for details. Unsupported Operating Systems ----------------------------- -Windows XP is no longer supported by Microsoft, thus, per :PEP:`11`, CPython +Windows XP is no longer supported by Microsoft, thus, per :pep:`11`, CPython 3.5 is no longer officially supported on this OS. diff --git a/Misc/NEWS.d/3.5.0a1.rst b/Misc/NEWS.d/3.5.0a1.rst index 7eb8326a012fb6..31ec21fdd8fdcf 100644 --- a/Misc/NEWS.d/3.5.0a1.rst +++ b/Misc/NEWS.d/3.5.0a1.rst @@ -3555,7 +3555,7 @@ created for every test class. .. nonce: kfV0wm .. section: Library -Fix PEP 3118 format strings on ctypes objects with a nontrivial shape. +Fix :pep:`3118` format strings on ctypes objects with a nontrivial shape. .. @@ -4824,7 +4824,7 @@ tests. .. nonce: kqetng .. section: IDLE -Change default paragraph width to 72, the PEP 8 recommendation. +Change default paragraph width to 72, the :pep:`8` recommendation. .. @@ -5759,7 +5759,7 @@ Add support for ``yield from`` to 2to3. .. nonce: dpFbyZ .. section: Tools/Demos -Add support for the PEP 465 matrix multiplication operator to 2to3. +Add support for the :pep:`465` matrix multiplication operator to 2to3. .. diff --git a/Misc/NEWS.d/3.5.0a2.rst b/Misc/NEWS.d/3.5.0a2.rst index b16acdb3822d4c..861b23ede3958e 100644 --- a/Misc/NEWS.d/3.5.0a2.rst +++ b/Misc/NEWS.d/3.5.0a2.rst @@ -15,7 +15,7 @@ previous exception. .. nonce: Ks6_2x .. section: Library -New os.scandir() function, part of the PEP 471: "os.scandir() function -- a +New os.scandir() function, part of the :pep:`471`: "os.scandir() function -- a better and faster directory iterator". Patch written by Ben Hoyt. .. @@ -393,7 +393,7 @@ attribute. .. nonce: qBauCy .. section: Windows -Implement PEP 486 - Make the Python Launcher aware of virtual environments. +Implement :pep:`486` - Make the Python Launcher aware of virtual environments. Patch by Paul Moore. .. diff --git a/Misc/NEWS.d/3.5.0a4.rst b/Misc/NEWS.d/3.5.0a4.rst index eb63a834f07f3f..f60aa0a22d1979 100644 --- a/Misc/NEWS.d/3.5.0a4.rst +++ b/Misc/NEWS.d/3.5.0a4.rst @@ -7,7 +7,7 @@ Under Linux, GNU/KFreeBSD and the Hurd, C extensions now include the architecture triplet in the extension name, to make it easy to test builds for different ABIs in the same working tree. Under OS X, the extension name -now includes PEP 3149-style information. +now includes :pep:`3149`-style information. .. @@ -26,7 +26,7 @@ Joe Jevnik. .. nonce: FOXb37 .. section: Core and Builtins -Implement PEP 488: removal of .pyo files. +Implement :pep:`488`: removal of .pyo files. .. @@ -495,7 +495,7 @@ modules already mapped with full name mapping. select.select() is now retried automatically with the recomputed timeout when interrupted by a signal, except if the signal handler raises an -exception. This change is part of the PEP 475. +exception. This change is part of the :pep:`475`. .. diff --git a/Misc/NEWS.d/3.5.0b2.rst b/Misc/NEWS.d/3.5.0b2.rst index 21c75dd235220a..43bf4a8b1150be 100644 --- a/Misc/NEWS.d/3.5.0b2.rst +++ b/Misc/NEWS.d/3.5.0b2.rst @@ -62,7 +62,7 @@ Fix a crash in the StreamWriter.reset() of CJK codecs. .. nonce: M2rJNs .. section: Library -Add math.isclose() and cmath.isclose() functions as per PEP 485. Contributed +Add math.isclose() and cmath.isclose() functions as per :pep:`485`. Contributed by Chris Barker and Tal Einat. .. diff --git a/Misc/NEWS.d/3.5.0b3.rst b/Misc/NEWS.d/3.5.0b3.rst index bb4cc33cc9902d..5e981f8badd1bd 100644 --- a/Misc/NEWS.d/3.5.0b3.rst +++ b/Misc/NEWS.d/3.5.0b3.rst @@ -33,7 +33,7 @@ Add Py_tp_finalize slot for the stable ABI. .. nonce: 2mNeD8 .. section: Core and Builtins -Introduce a distinct type for PEP 492 coroutines; add types.CoroutineType, +Introduce a distinct type for :pep:`492` coroutines; add types.CoroutineType, inspect.getcoroutinestate, inspect.getcoroutinelocals; coroutines no longer use CO_GENERATOR flag; sys.set_coroutine_wrapper works only for 'async def' coroutines; inspect.iscoroutine no longer uses collections.abc.Coroutine, diff --git a/Misc/NEWS.d/3.5.0b4.rst b/Misc/NEWS.d/3.5.0b4.rst index bcc7345d8a7c6b..51cefe2a1f8246 100644 --- a/Misc/NEWS.d/3.5.0b4.rst +++ b/Misc/NEWS.d/3.5.0b4.rst @@ -14,7 +14,7 @@ argument on Linux. .. nonce: bqh6PQ .. section: Core and Builtins -Make PEP 448 dictionary evaluation more consistent. +Make :pep:`448` dictionary evaluation more consistent. .. diff --git a/Misc/NEWS.d/3.5.0rc3.rst b/Misc/NEWS.d/3.5.0rc3.rst index c6976c0f0c28dc..2f770a01610e88 100644 --- a/Misc/NEWS.d/3.5.0rc3.rst +++ b/Misc/NEWS.d/3.5.0rc3.rst @@ -23,7 +23,7 @@ Prevent __class__ assignment to immutable built-in objects. .. nonce: 2gLdfN .. section: Core and Builtins -Fix AST compilation for PEP 448 syntax. +Fix AST compilation for :pep:`448` syntax. .. diff --git a/Misc/NEWS.d/3.5.2rc1.rst b/Misc/NEWS.d/3.5.2rc1.rst index 3d513b3b9af85a..23486e31116f9d 100644 --- a/Misc/NEWS.d/3.5.2rc1.rst +++ b/Misc/NEWS.d/3.5.2rc1.rst @@ -300,7 +300,7 @@ Fixed problem with in-place string concatenation and utf-8 cache. .. nonce: tCCgmH .. section: Core and Builtins -Mention PEP 420 in the importlib docs. +Mention :pep:`420` in the importlib docs. .. @@ -423,7 +423,7 @@ A new version of typing.py provides several new classes and features: @overload outside stubs, Reversible, DefaultDict, Text, ContextManager, Type[], NewType(), TYPE_CHECKING, and numerous bug fixes (note that some of the new features are not yet implemented in mypy or other static analyzers). -Also classes for PEP 492 (Awaitable, AsyncIterable, AsyncIterator) have been +Also classes for :pep:`492` (Awaitable, AsyncIterable, AsyncIterator) have been added (in fact they made it into 3.5.1 but were never mentioned). .. @@ -1816,7 +1816,7 @@ Patch by Ammar Askar. .. nonce: MUK0zK .. section: Documentation -Document the new PEP 448 unpacking syntax of 3.5. +Document the new :pep:`448` unpacking syntax of 3.5. .. diff --git a/Misc/NEWS.d/3.5.3rc1.rst b/Misc/NEWS.d/3.5.3rc1.rst index bca43c8f708f64..3a51fad2472c0f 100644 --- a/Misc/NEWS.d/3.5.3rc1.rst +++ b/Misc/NEWS.d/3.5.3rc1.rst @@ -1402,7 +1402,7 @@ Zijlstra. When an exception is raised within the context being managed by a contextlib.ExitStack() and one of the exit stack generators catches and raises it in a chain, do not re-raise the original exception when exiting, -let the new chained one through. This avoids the PEP 479 bug described in +let the new chained one through. This avoids the :pep:`479` bug described in issue25782. .. diff --git a/Misc/NEWS.d/3.6.0a1.rst b/Misc/NEWS.d/3.6.0a1.rst index 254d3616645036..2e259c59c16861 100644 --- a/Misc/NEWS.d/3.6.0a1.rst +++ b/Misc/NEWS.d/3.6.0a1.rst @@ -144,7 +144,7 @@ Fix the doc comment for FileFinder.find_spec(). .. nonce: tCCgmH .. section: Core and Builtins -Mention PEP 420 in the importlib docs. +Mention :pep:`420` in the importlib docs. .. @@ -203,7 +203,7 @@ Add tests for reloading namespace packages. .. nonce: CuMWZJ .. section: Core and Builtins -Switch applicable importlib tests to use PEP 451 API. +Switch applicable importlib tests to use :pep:`451` API. .. @@ -782,7 +782,7 @@ Patch from Mark Dickinson. .. nonce: wfyxbB .. section: Core and Builtins -Implement PEP 498 "Literal String Interpolation". This allows you to embed +Implement :pep:`498` "Literal String Interpolation". This allows you to embed expressions inside f-strings, which are converted to normal strings at run time. Given x=3, then f'value={x}' == 'value=3'. Patch by Eric V. Smith. @@ -1011,7 +1011,7 @@ Patch by Stefan Krah. .. nonce: LR__VD .. section: Library -Add secrets module as described in PEP 506. +Add secrets module as described in :pep:`506`. .. diff --git a/Misc/NEWS.d/3.6.0a2.rst b/Misc/NEWS.d/3.6.0a2.rst index 9e7326bc5c2ed6..fa050dec27ff03 100644 --- a/Misc/NEWS.d/3.6.0a2.rst +++ b/Misc/NEWS.d/3.6.0a2.rst @@ -44,7 +44,7 @@ Added BUILD_CONST_KEY_MAP opcode. .. nonce: EAnCS7 .. section: Core and Builtins -Add support for os.PathLike objects to open() (part of PEP 519). +Add support for os.PathLike objects to open() (part of :pep:`519`). .. @@ -215,7 +215,7 @@ bytes patterns. .. nonce: UYiwoh .. section: Library -Add os.PathLike support to DirEntry (part of PEP 519). Initial patch by +Add os.PathLike support to DirEntry (part of :pep:`519`). Initial patch by Jelle Zijlstra. .. @@ -246,7 +246,7 @@ PEP 519). Initial patch by Dusty Phillips. .. section: Library Add support for os.PathLike objects to os.fsencode() and os.fsdecode() (part -of PEP 519). +of :pep:`519`). .. @@ -255,7 +255,7 @@ of PEP 519). .. nonce: y7YRfj .. section: Library -Introduce os.PathLike and os.fspath() (part of PEP 519). +Introduce os.PathLike and os.fspath() (part of :pep:`519`). .. @@ -268,7 +268,7 @@ A new version of typing.py provides several new classes and features: @overload outside stubs, Reversible, DefaultDict, Text, ContextManager, Type[], NewType(), TYPE_CHECKING, and numerous bug fixes (note that some of the new features are not yet implemented in mypy or other static analyzers). -Also classes for PEP 492 (Awaitable, AsyncIterable, AsyncIterator) have been +Also classes for :pep:`492` (Awaitable, AsyncIterable, AsyncIterator) have been added (in fact they made it into 3.5.1 but were never mentioned). .. @@ -689,7 +689,7 @@ to use lowercase. Patch by Sean Rodman, test by Kaushik Nadikuditi. .. nonce: MUK0zK .. section: Documentation -Document the new PEP 448 unpacking syntax of 3.5. +Document the new :pep:`448` unpacking syntax of 3.5. .. @@ -770,7 +770,7 @@ https://github.com/python/pythondotorg/issues/945) .. nonce: Ll8R-t .. section: C API -Add the PyOS_FSPath() function (part of PEP 519). +Add the PyOS_FSPath() function (part of :pep:`519`). .. diff --git a/Misc/NEWS.d/3.6.0a3.rst b/Misc/NEWS.d/3.6.0a3.rst index 2ca258038bb876..4b0000b0e7975a 100644 --- a/Misc/NEWS.d/3.6.0a3.rst +++ b/Misc/NEWS.d/3.6.0a3.rst @@ -243,7 +243,7 @@ Zijlstra. When an exception is raised within the context being managed by a contextlib.ExitStack() and one of the exit stack generators catches and raises it in a chain, do not re-raise the original exception when exiting, -let the new chained one through. This avoids the PEP 479 bug described in +let the new chained one through. This avoids the :pep:`479` bug described in issue25782. .. diff --git a/Misc/NEWS.d/3.6.0a4.rst b/Misc/NEWS.d/3.6.0a4.rst index 0be9c8219777ed..d613fd5d928b65 100644 --- a/Misc/NEWS.d/3.6.0a4.rst +++ b/Misc/NEWS.d/3.6.0a4.rst @@ -122,7 +122,7 @@ SystemError. .. nonce: VrInsj .. section: Core and Builtins -Implemented PEP 487 (Simpler customization of class creation). Upon +Implemented :pep:`487` (Simpler customization of class creation). Upon subclassing, the __init_subclass__ classmethod is called on the base class. Descriptors are initialized with __set_name__ after class creation. @@ -133,7 +133,7 @@ Descriptors are initialized with __set_name__ after class creation. .. nonce: nfVMKM .. section: Library -Add PEP 519/__fspath__() support to the os and os.path modules. Includes +Add :pep:`519`/__fspath__() support to the os and os.path modules. Includes code from Jelle Zijlstra. (See also: bpo-27524) .. @@ -197,7 +197,7 @@ keyword-only. .. nonce: nbAEM8 .. section: Library -Add mathematical constant tau to math and cmath. See also PEP 628. +Add mathematical constant tau to math and cmath. See also :pep:`628`. .. @@ -400,7 +400,7 @@ of 4 GiB. .. nonce: IDW05R .. section: Library -Implemented PEP 495 (Local Time Disambiguation). +Implemented :pep:`495` (Local Time Disambiguation). .. @@ -604,7 +604,7 @@ Update bundled Tcl/Tk to 8.6.6. .. nonce: O0o0mB .. section: Windows -Adds PEP 514 metadata to Windows installer +Adds :pep:`514` metadata to Windows installer .. diff --git a/Misc/NEWS.d/3.6.0b1.rst b/Misc/NEWS.d/3.6.0b1.rst index f151557dcc2c05..bd0e0a7c58d12e 100644 --- a/Misc/NEWS.d/3.6.0b1.rst +++ b/Misc/NEWS.d/3.6.0b1.rst @@ -26,7 +26,7 @@ NSMALLPOSINTS = 0. .. nonce: Te4Tjb .. section: Core and Builtins -Implement formatting support for PEP 515. Initial patch by Chris Angelico. +Implement formatting support for :pep:`515`. Initial patch by Chris Angelico. .. @@ -107,7 +107,7 @@ Serhiy Storchaka and Victor Stinner. .. nonce: TdJp8_ .. section: Core and Builtins -Implement tokenizing support for PEP 515. Patch by Georg Brandl. +Implement tokenizing support for :pep:`515`. Patch by Georg Brandl. .. @@ -126,7 +126,7 @@ Levkivskyi. .. nonce: noeoav .. section: Core and Builtins -Implement PEP 525 -- Asynchronous Generators. +Implement :pep:`525` -- Asynchronous Generators. .. @@ -135,7 +135,7 @@ Implement PEP 525 -- Asynchronous Generators. .. nonce: 0ayJ5k .. section: Core and Builtins -Implement PEP 526 -- Syntax for Variable Annotations. Patch by Ivan +Implement :pep:`526` -- Syntax for Variable Annotations. Patch by Ivan Levkivskyi. .. @@ -224,7 +224,7 @@ longer a relevant platform for Python. .. nonce: rdhhVw .. section: Core and Builtins -Implement PEP 523. +Implement :pep:`523`. .. @@ -410,7 +410,7 @@ Patch written by Xiang Zhang. .. nonce: 0DdIrA .. section: Core and Builtins -Implement PEP 530 -- asynchronous comprehensions. +Implement :pep:`530` -- asynchronous comprehensions. .. diff --git a/Misc/NEWS.d/3.6.0rc1.rst b/Misc/NEWS.d/3.6.0rc1.rst index 17220ca6df626f..c44dec324d2fbf 100644 --- a/Misc/NEWS.d/3.6.0rc1.rst +++ b/Misc/NEWS.d/3.6.0rc1.rst @@ -110,7 +110,7 @@ PyUnicode_CompareWithASCIIString() now never raises exceptions. The data model reference and the porting section in the What's New guide now cover the additional ``__classcell__`` handling needed for custom -metaclasses to fully support PEP 487 and zero-argument ``super()``. +metaclasses to fully support :pep:`487` and zero-argument ``super()``. .. diff --git a/Misc/NEWS.d/3.6.1rc1.rst b/Misc/NEWS.d/3.6.1rc1.rst index 9137df6c1435e6..1f9fb13f69701b 100644 --- a/Misc/NEWS.d/3.6.1rc1.rst +++ b/Misc/NEWS.d/3.6.1rc1.rst @@ -465,7 +465,7 @@ Patch written by Jiajun Huang. .. nonce: kN5S6v .. section: Library -functools.lru_cache() now respects PEP 468 and preserves the order of +functools.lru_cache() now respects :pep:`468` and preserves the order of keyword arguments. f(a=1, b=2) is now cached separately from f(b=2, a=1) since both calls could potentially give different results. @@ -689,7 +689,7 @@ Correctly handle special console filenames (patch by Eryk Sun) .. nonce: bhvrJ2 .. section: Windows -Implement PEP 529 for io.FileIO (Patch by Eryk Sun) +Implement :pep:`529` for io.FileIO (Patch by Eryk Sun) .. diff --git a/Misc/NEWS.d/3.6.3rc1.rst b/Misc/NEWS.d/3.6.3rc1.rst index ca812c63eed901..9c9eac63526174 100644 --- a/Misc/NEWS.d/3.6.3rc1.rst +++ b/Misc/NEWS.d/3.6.3rc1.rst @@ -406,7 +406,7 @@ avoid keeping a reference to yielded objects. .. nonce: nmAvfu .. section: Library -Fix ctypes producing wrong PEP 3118 type codes for integer types. +Fix ctypes producing wrong :pep:`3118` type codes for integer types. .. @@ -1252,7 +1252,7 @@ by Cheryl Sabella. .. section: Tools/Demos gdb integration commands (py-bt, etc.) work on optimized shared builds now, -too. PEP 523 introduced _PyEval_EvalFrameDefault which inlines +too. :pep:`523` introduced _PyEval_EvalFrameDefault which inlines PyEval_EvalFrameEx on non-debug shared builds. This broke the ability to use py-bt, py-up, and a few other Python-specific gdb integrations. The problem is fixed by only looking for _PyEval_EvalFrameDefault frames in diff --git a/Misc/NEWS.d/3.6.6rc1.rst b/Misc/NEWS.d/3.6.6rc1.rst index f6038768bd401a..71a5c3ec595ba2 100644 --- a/Misc/NEWS.d/3.6.6rc1.rst +++ b/Misc/NEWS.d/3.6.6rc1.rst @@ -376,7 +376,7 @@ implementation. .. nonce: pyR0jB .. section: Library -Update difflib.mdiff() for PEP 479. Convert an uncaught StopIteration in a +Update difflib.mdiff() for :pep:`479`. Convert an uncaught StopIteration in a generator into a return-statement. .. diff --git a/Misc/NEWS.d/3.7.0a1.rst b/Misc/NEWS.d/3.7.0a1.rst index 0c13bf022e6078..c8d061ee6b00e7 100644 --- a/Misc/NEWS.d/3.7.0a1.rst +++ b/Misc/NEWS.d/3.7.0a1.rst @@ -426,7 +426,7 @@ expression, and generator expressions and comprehensions. .. nonce: f_IHor .. section: Core and Builtins -Implement PEP 538 (legacy C locale coercion). This means that when a +Implement :pep:`538` (legacy C locale coercion). This means that when a suitable coercion target locale is available, both the core interpreter and locale-aware C extensions will assume the use of UTF-8 as the default text encoding, rather than ASCII. @@ -948,7 +948,7 @@ The preferred encoding is UTF-8 on Android. Patch written by Chi Hsuan Yen. .. nonce: 2a8zxB .. section: Core and Builtins -Clean up interpreter startup (see PEP 432). +Clean up interpreter startup (see :pep:`432`). .. @@ -1774,7 +1774,7 @@ Fix ``fileinput.FileInput(files, inplace=True)`` when ``files`` contain .. nonce: nmAvfu .. section: Library -Fix ctypes producing wrong PEP 3118 type codes for integer types. +Fix ctypes producing wrong :pep:`3118` type codes for integer types. .. @@ -4877,7 +4877,7 @@ Fix Python 2 syntax in code for building the documentation. The data model reference and the porting section in the 3.6 What's New guide now cover the additional ``__classcell__`` handling needed for custom -metaclasses to fully support PEP 487 and zero-argument ``super()``. +metaclasses to fully support :pep:`487` and zero-argument ``super()``. .. @@ -5106,7 +5106,7 @@ difficult to maintain low-level internal code. .. nonce: XLuZFk .. section: Build -Per PEP 11, support for the IRIX operating system was removed. +Per :pep:`11`, support for the IRIX operating system was removed. .. @@ -6225,7 +6225,7 @@ description of the configuration system. .. section: Tools/Demos gdb integration commands (py-bt, etc.) work on optimized shared builds now, -too. PEP 523 introduced _PyEval_EvalFrameDefault which inlines +too. :pep:`523` introduced _PyEval_EvalFrameDefault which inlines PyEval_EvalFrameEx on non-debug shared builds. This broke the ability to use py-bt, py-up, and a few other Python-specific gdb integrations. The problem is fixed by only looking for _PyEval_EvalFrameDefault frames in diff --git a/Misc/NEWS.d/3.7.0a2.rst b/Misc/NEWS.d/3.7.0a2.rst index 363899eae6f936..b1b7c92f66a6f5 100644 --- a/Misc/NEWS.d/3.7.0a2.rst +++ b/Misc/NEWS.d/3.7.0a2.rst @@ -249,7 +249,7 @@ by Oren Milman. .. nonce: _kr47t .. section: Core and Builtins -Make ``async`` and ``await`` proper keywords, as specified in PEP 492. +Make ``async`` and ``await`` proper keywords, as specified in :pep:`492`. .. @@ -680,7 +680,7 @@ and Py_SetPath() .. nonce: vm8vGE .. section: C API -Implement PEP 539 for Thread Specific Storage (TSS) API: it is a new Thread +Implement :pep:`539` for Thread Specific Storage (TSS) API: it is a new Thread Local Storage (TLS) API to CPython which would supersede use of the existing TLS API within the CPython interpreter, while deprecating the existing API. PEP written by Erik M. Bray, patch by Masayuki Yamamoto. diff --git a/Misc/NEWS.d/3.7.0a3.rst b/Misc/NEWS.d/3.7.0a3.rst index 176441e2b0e7d3..307ea543051ef8 100644 --- a/Misc/NEWS.d/3.7.0a3.rst +++ b/Misc/NEWS.d/3.7.0a3.rst @@ -552,7 +552,7 @@ Patch by Dong-hee Na. .. nonce: YMQ7Q2 .. section: Library -inspect.signature should follow PEP 8, if the parameter has an annotation +inspect.signature should follow :pep:`8`, if the parameter has an annotation and a default value. Patch by Dong-hee Na. .. diff --git a/Misc/NEWS.d/3.7.0b4.rst b/Misc/NEWS.d/3.7.0b4.rst index a6cae281918216..55c60686494341 100644 --- a/Misc/NEWS.d/3.7.0b4.rst +++ b/Misc/NEWS.d/3.7.0b4.rst @@ -216,7 +216,7 @@ implementation. .. nonce: pyR0jB .. section: Library -Update difflib.mdiff() for PEP 479. Convert an uncaught StopIteration in a +Update difflib.mdiff() for :pep:`479`. Convert an uncaught StopIteration in a generator into a return-statement. .. diff --git a/Misc/NEWS.d/3.7.0b5.rst b/Misc/NEWS.d/3.7.0b5.rst index 4fe3ed59fc9bc9..20476993b9652a 100644 --- a/Misc/NEWS.d/3.7.0b5.rst +++ b/Misc/NEWS.d/3.7.0b5.rst @@ -475,7 +475,7 @@ Document that `asyncio.wait()` does not cancel its futures on timeout. .. nonce: S1LGPa .. section: Documentation -Document PEP 567 changes to asyncio. +Document :pep:`567` changes to asyncio. .. diff --git a/Misc/NEWS.d/3.7.0rc1.rst b/Misc/NEWS.d/3.7.0rc1.rst index bc3cc8ee6a324c..89457ef59ab38d 100644 --- a/Misc/NEWS.d/3.7.0rc1.rst +++ b/Misc/NEWS.d/3.7.0rc1.rst @@ -168,7 +168,7 @@ Emit a deprecation warning for inspect.formatargspec .. nonce: r4z9MM .. section: Documentation -Clarified the relationship between PEP 538's PYTHONCOERCECLOCALE and PEP +Clarified the relationship between :pep:`538`'s PYTHONCOERCECLOCALE and PEP 540's PYTHONUTF8 mode. .. diff --git a/Misc/NEWS.d/next/Documentation/2018-05-23-11-59-51.bpo-32436.S1LGPa.rst b/Misc/NEWS.d/next/Documentation/2018-05-23-11-59-51.bpo-32436.S1LGPa.rst index 8eeb561921a854..a4ecc23f89256b 100644 --- a/Misc/NEWS.d/next/Documentation/2018-05-23-11-59-51.bpo-32436.S1LGPa.rst +++ b/Misc/NEWS.d/next/Documentation/2018-05-23-11-59-51.bpo-32436.S1LGPa.rst @@ -1 +1 @@ -Document PEP 567 changes to asyncio. +Document :pep:`567` changes to asyncio. diff --git a/Misc/NEWS.d/next/Documentation/2018-06-08-23-46-01.bpo-33409.r4z9MM.rst b/Misc/NEWS.d/next/Documentation/2018-06-08-23-46-01.bpo-33409.r4z9MM.rst index 5b1a018df55ae1..f26ddd82400eb0 100644 --- a/Misc/NEWS.d/next/Documentation/2018-06-08-23-46-01.bpo-33409.r4z9MM.rst +++ b/Misc/NEWS.d/next/Documentation/2018-06-08-23-46-01.bpo-33409.r4z9MM.rst @@ -1,2 +1,2 @@ -Clarified the relationship between PEP 538's PYTHONCOERCECLOCALE and PEP +Clarified the relationship between :pep:`538`'s PYTHONCOERCECLOCALE and PEP 540's PYTHONUTF8 mode. diff --git a/Misc/NEWS.d/next/Library/2018-04-04-23-41-30.bpo-33224.pyR0jB.rst b/Misc/NEWS.d/next/Library/2018-04-04-23-41-30.bpo-33224.pyR0jB.rst index 87ff100da4b696..b0ddba9335e2e6 100644 --- a/Misc/NEWS.d/next/Library/2018-04-04-23-41-30.bpo-33224.pyR0jB.rst +++ b/Misc/NEWS.d/next/Library/2018-04-04-23-41-30.bpo-33224.pyR0jB.rst @@ -1,2 +1,2 @@ -Update difflib.mdiff() for PEP 479. Convert an uncaught StopIteration in a +Update difflib.mdiff() for :pep:`479`. Convert an uncaught StopIteration in a generator into a return-statement. From b9c28481e84750c0a44a70fe6a0d79571c152327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Wirtel?= Date: Mon, 22 Oct 2018 14:18:06 +0200 Subject: [PATCH 2/4] Add the blurb entry with the bpo number --- .../next/Documentation/2018-10-22-14-17-57.bpo-35042.1UGv1a.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Documentation/2018-10-22-14-17-57.bpo-35042.1UGv1a.rst diff --git a/Misc/NEWS.d/next/Documentation/2018-10-22-14-17-57.bpo-35042.1UGv1a.rst b/Misc/NEWS.d/next/Documentation/2018-10-22-14-17-57.bpo-35042.1UGv1a.rst new file mode 100644 index 00000000000000..68321b772cadc5 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2018-10-22-14-17-57.bpo-35042.1UGv1a.rst @@ -0,0 +1,2 @@ +Replace PEP XYZ by the role `:pep:` and allow to use the direct links to the +PEPs. From d829e2537f3dc90557a6e5805b6e00279bd11cd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Wirtel?= Date: Mon, 22 Oct 2018 15:02:13 +0200 Subject: [PATCH 3/4] Fix issues with the :pep: role --- Doc/distutils/apiref.rst | 2 +- Doc/library/wsgiref.rst | 2 +- .../Documentation/2018-10-22-14-17-57.bpo-35042.1UGv1a.rst | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Doc/distutils/apiref.rst b/Doc/distutils/apiref.rst index 4a87a7c05f6e16..9d5c2ab696ffce 100644 --- a/Doc/distutils/apiref.rst +++ b/Doc/distutils/apiref.rst @@ -1394,7 +1394,7 @@ filesystem and building lists of files. :mod:`distutils.log` --- Simple :pep:`282`-style logging -===================================================== +======================================================== .. module:: distutils.log :synopsis: A simple logging mechanism, :pep:`282`-style diff --git a/Doc/library/wsgiref.rst b/Doc/library/wsgiref.rst index 0dc7c11a5758ff..ffca1fc8168f5b 100644 --- a/Doc/library/wsgiref.rst +++ b/Doc/library/wsgiref.rst @@ -767,7 +767,7 @@ This is a working "Hello World" WSGI application:: # use a function (note that you're not limited to a function, you can # use a class for example). The first argument passed to the function # is a dictionary containing CGI-style environment variables and the - # second variable is the callable object (see :pep:`333`). + # second variable is the callable object (see PEP 333). def hello_world_app(environ, start_response): status = '200 OK' # HTTP Status headers = [('Content-type', 'text/plain; charset=utf-8')] # HTTP Headers diff --git a/Misc/NEWS.d/next/Documentation/2018-10-22-14-17-57.bpo-35042.1UGv1a.rst b/Misc/NEWS.d/next/Documentation/2018-10-22-14-17-57.bpo-35042.1UGv1a.rst index 68321b772cadc5..3ebbd3a8005a5d 100644 --- a/Misc/NEWS.d/next/Documentation/2018-10-22-14-17-57.bpo-35042.1UGv1a.rst +++ b/Misc/NEWS.d/next/Documentation/2018-10-22-14-17-57.bpo-35042.1UGv1a.rst @@ -1,2 +1 @@ -Replace PEP XYZ by the role `:pep:` and allow to use the direct links to the -PEPs. +Replace PEP XYZ by the pep role and allow to use the direct links to the PEPs. From 4d1543fc5a1c386a35ed4c694aa954c1b591a175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Wirtel?= Date: Mon, 22 Oct 2018 15:12:41 +0200 Subject: [PATCH 4/4] rollback :PEP: to :pep: after discussion wit Serhyi --- Doc/c-api/intro.rst | 2 +- Doc/c-api/module.rst | 6 +++--- Doc/extending/extending.rst | 2 +- Doc/library/py_compile.rst | 2 +- Doc/whatsnew/3.5.rst | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Doc/c-api/intro.rst b/Doc/c-api/intro.rst index 3d2c5561569cc3..15006100c7366a 100644 --- a/Doc/c-api/intro.rst +++ b/Doc/c-api/intro.rst @@ -34,7 +34,7 @@ Coding standards ================ If you're writing C code for inclusion in CPython, you **must** follow the -guidelines and standards defined in :pep:`7`. These guidelines apply +guidelines and standards defined in :PEP:`7`. These guidelines apply regardless of the version of Python you are contributing to. Following these conventions is not necessary for your own third party extension modules, unless you eventually expect to contribute them to Python. diff --git a/Doc/c-api/module.rst b/Doc/c-api/module.rst index 149ac64e728e7e..017b656854a8cd 100644 --- a/Doc/c-api/module.rst +++ b/Doc/c-api/module.rst @@ -173,7 +173,7 @@ or request "multi-phase initialization" by returning the definition struct itsel for its state. Non-negative ``m_size`` is required for multi-phase initialization. - See :pep:`3121` for more details. + See :PEP:`3121` for more details. .. c:member:: PyMethodDef* m_methods @@ -309,7 +309,7 @@ The available slot types are: .. c:function:: PyObject* create_module(PyObject *spec, PyModuleDef *def) The function receives a :py:class:`~importlib.machinery.ModuleSpec` - instance, as defined in :pep:`451`, and the module definition. + instance, as defined in :PEP:`451`, and the module definition. It should return a new module object, or set an error and return *NULL*. @@ -345,7 +345,7 @@ The available slot types are: If multiple ``Py_mod_exec`` slots are specified, they are processed in the order they appear in the *m_slots* array. -See :pep:`489` for more details on multi-phase initialization. +See :PEP:`489` for more details on multi-phase initialization. Low-level module creation functions ................................... diff --git a/Doc/extending/extending.rst b/Doc/extending/extending.rst index 9d46708df5d3c0..82b689e064c1d5 100644 --- a/Doc/extending/extending.rst +++ b/Doc/extending/extending.rst @@ -421,7 +421,7 @@ read as an example. Unlike our ``spam`` example, ``xxmodule`` uses *multi-phase initialization* (new in Python 3.5), where a PyModuleDef structure is returned from ``PyInit_spam``, and creation of the module is left to the import machinery. - For details on multi-phase initialization, see :pep:`489`. + For details on multi-phase initialization, see :PEP:`489`. .. _compilation: diff --git a/Doc/library/py_compile.rst b/Doc/library/py_compile.rst index c95d11db25e055..8cb5a4d546c874 100644 --- a/Doc/library/py_compile.rst +++ b/Doc/library/py_compile.rst @@ -60,7 +60,7 @@ byte-code cache files in the directory containing the source code. the default is :attr:`PycInvalidationMode.TIMESTAMP`. .. versionchanged:: 3.2 - Changed default value of *cfile* to be :pep:`3147`-compliant. Previous + Changed default value of *cfile* to be :PEP:`3147`-compliant. Previous default was *file* + ``'c'`` (``'o'`` if optimization was enabled). Also added the *optimize* parameter. diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst index 91387a102c8cda..4eddf841dcbec2 100644 --- a/Doc/whatsnew/3.5.rst +++ b/Doc/whatsnew/3.5.rst @@ -2282,7 +2282,7 @@ for details. Unsupported Operating Systems ----------------------------- -Windows XP is no longer supported by Microsoft, thus, per :pep:`11`, CPython +Windows XP is no longer supported by Microsoft, thus, per :PEP:`11`, CPython 3.5 is no longer officially supported on this OS.