bpo-35042: Use the :pep: role where a PEP is specified (#10036)
diff --git a/Doc/library/abc.rst b/Doc/library/abc.rst
index 7071076..2aba02f 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 fba0ea6..78a5157 100644
--- a/Doc/library/pkgutil.rst
+++ b/Doc/library/pkgutil.rst
@@ -63,7 +63,7 @@
.. 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 @@
.. 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 @@
.. 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 @@
.. 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 @@
.. 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 @@
.. 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 @@
.. 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 @@
.. 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/test.rst b/Doc/library/test.rst
index 95d7f54..6a10bab 100644
--- a/Doc/library/test.rst
+++ b/Doc/library/test.rst
@@ -392,7 +392,7 @@
.. 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 9861da8..06c1b85 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 e0f745f..ffca1fc 100644
--- a/Doc/library/wsgiref.rst
+++ b/Doc/library/wsgiref.rst
@@ -739,7 +739,7 @@
.. 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
diff --git a/Doc/library/zipimport.rst b/Doc/library/zipimport.rst
index 4fbd0e8..aa1831d 100644
--- a/Doc/library/zipimport.rst
+++ b/Doc/library/zipimport.rst
@@ -39,8 +39,8 @@
: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.