Skip to content

Commit 3438899

Browse files
committed
pythongh-107298: Fix doc references to undocumented modules
1 parent b1de380 commit 3438899

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

Doc/c-api/arg.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ API Functions
477477
will be set if there was a failure.
478478
479479
This is an example of the use of this function, taken from the sources for the
480-
:mod:`_weakref` helper module for weak references::
480+
:mod:`!_weakref` helper module for weak references::
481481
482482
static PyObject *
483483
weakref_ref(PyObject *self, PyObject *args)

Doc/c-api/codec.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Codec registry and support functions
77
88
Register a new codec search function.
99
10-
As side effect, this tries to load the :mod:`encodings` package, if not yet
10+
As side effect, this tries to load the :mod:`!encodings` package, if not yet
1111
done, to make sure that it is always first in the list of search functions.
1212
1313
.. c:function:: int PyCodec_Unregister(PyObject *search_function)

Doc/c-api/typeobj.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ and :c:type:`PyType_Type` effectively act as defaults.)
579579
name, followed by a dot, followed by the type name; for built-in types, it
580580
should be just the type name. If the module is a submodule of a package, the
581581
full package name is part of the full module name. For example, a type named
582-
:class:`T` defined in module :mod:`M` in subpackage :mod:`Q` in package :mod:`P`
582+
:class:`T` defined in module :mod:`!M` in subpackage :mod:`!Q` in package :mod:`!P`
583583
should have the :c:member:`~PyTypeObject.tp_name` initializer ``"P.Q.M.T"``.
584584

585585
For :ref:`dynamically allocated type objects <heap-types>`,

Doc/c-api/unicode.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1205,7 +1205,7 @@ Character Map Codecs
12051205
12061206
This codec is special in that it can be used to implement many different codecs
12071207
(and this is in fact what was done to obtain most of the standard codecs
1208-
included in the :mod:`encodings` package). The codec uses mappings to encode and
1208+
included in the :mod:`!encodings` package). The codec uses mappings to encode and
12091209
decode characters. The mapping objects provided must support the
12101210
:meth:`__getitem__` mapping interface; dictionaries and sequences work well.
12111211

Doc/extending/extending.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ Note that PyMODINIT_FUNC declares the function as ``PyObject *`` return type,
367367
declares any special linkage declarations required by the platform, and for C++
368368
declares the function as ``extern "C"``.
369369

370-
When the Python program imports module :mod:`spam` for the first time,
370+
When the Python program imports module :mod:`!spam` for the first time,
371371
:c:func:`PyInit_spam` is called. (See below for comments about embedding Python.)
372372
It calls :c:func:`PyModule_Create`, which returns a module object, and
373373
inserts built-in function objects into the newly created module based upon the
@@ -1219,7 +1219,7 @@ file corresponding to the module provides a macro that takes care of importing
12191219
the module and retrieving its C API pointers; client modules only have to call
12201220
this macro before accessing the C API.
12211221

1222-
The exporting module is a modification of the :mod:`spam` module from section
1222+
The exporting module is a modification of the :mod:`!spam` module from section
12231223
:ref:`extending-simpleexample`. The function :func:`spam.system` does not call
12241224
the C library function :c:func:`system` directly, but a function
12251225
:c:func:`PySpam_System`, which would of course do something more complicated in

Doc/extending/newtypes_tutorial.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ object.
3737

3838
This sort of thing can only be explained by example, so here's a minimal, but
3939
complete, module that defines a new type named :class:`Custom` inside a C
40-
extension module :mod:`custom`:
40+
extension module :mod:`!custom`:
4141

4242
.. note::
4343
What we're showing here is the traditional way of defining *static*
@@ -55,7 +55,7 @@ from the previous chapter. This file defines three things:
5555
#. How the :class:`Custom` **type** behaves: this is the ``CustomType`` struct,
5656
which defines a set of flags and function pointers that the interpreter
5757
inspects when specific operations are requested.
58-
#. How to initialize the :mod:`custom` module: this is the ``PyInit_custom``
58+
#. How to initialize the :mod:`!custom` module: this is the ``PyInit_custom``
5959
function and the associated ``custommodule`` struct.
6060

6161
The first bit is::
@@ -127,7 +127,7 @@ our objects and in some error messages, for example:
127127
TypeError: can only concatenate str (not "custom.Custom") to str
128128
129129
Note that the name is a dotted name that includes both the module name and the
130-
name of the type within the module. The module in this case is :mod:`custom` and
130+
name of the type within the module. The module in this case is :mod:`!custom` and
131131
the type is :class:`Custom`, so we set the type name to :class:`custom.Custom`.
132132
Using the real dotted import path is important to make your type compatible
133133
with the :mod:`pydoc` and :mod:`pickle` modules. ::
@@ -229,7 +229,7 @@ Adding data and methods to the Basic example
229229
============================================
230230

231231
Let's extend the basic example to add some data and methods. Let's also make
232-
the type usable as a base class. We'll create a new module, :mod:`custom2` that
232+
the type usable as a base class. We'll create a new module, :mod:`!custom2` that
233233
adds these capabilities:
234234

235235
.. literalinclude:: ../includes/custom2.c

Doc/install/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ will expand this to your home directory::
374374

375375
To make Python find the distributions installed with this scheme, you may have
376376
to :ref:`modify Python's search path <inst-search-path>` or edit
377-
:mod:`sitecustomize` (see :mod:`site`) to call :func:`site.addsitedir` or edit
377+
:mod:`!sitecustomize` (see :mod:`site`) to call :func:`site.addsitedir` or edit
378378
:data:`sys.path`.
379379

380380
The :option:`!--home` option defines the installation base directory. Files are

0 commit comments

Comments
 (0)