]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-101100: Fix Sphinx reference warnings (GH-112416) (#112422)
authorHugo van Kemenade <hugovk@users.noreply.github.com>
Sun, 26 Nov 2023 12:22:17 +0000 (14:22 +0200)
committerGitHub <noreply@github.com>
Sun, 26 Nov 2023 12:22:17 +0000 (05:22 -0700)
Doc/c-api/set.rst
Doc/extending/newtypes.rst
Doc/library/asyncio-stream.rst
Doc/library/email.errors.rst
Doc/library/gzip.rst
Doc/library/importlib.resources.rst
Doc/library/xml.rst
Doc/tools/.nitignore

index 09c0fb6b9c5f233cef91971d3a8ebfda3d1dde4c..cba823aa027bd6d148f2ae1eb8851fc72faedf20 100644 (file)
@@ -147,7 +147,7 @@ subtypes but not for instances of :class:`frozenset` or its subtypes.
 
    Return ``1`` if found and removed, ``0`` if not found (no action taken), and ``-1`` if an
    error is encountered.  Does not raise :exc:`KeyError` for missing keys.  Raise a
-   :exc:`TypeError` if the *key* is unhashable.  Unlike the Python :meth:`~set.discard`
+   :exc:`TypeError` if the *key* is unhashable.  Unlike the Python :meth:`~frozenset.discard`
    method, this function does not automatically convert unhashable sets into
    temporary frozensets. Raise :exc:`SystemError` if *set* is not an
    instance of :class:`set` or its subtype.
index 8ea76aec8290db695943851ab17357d190f6f5b8..dd561e611d18f9cc5d248ca380ee618becfd486c 100644 (file)
@@ -321,7 +321,7 @@ An interesting advantage of using the :c:member:`~PyTypeObject.tp_members` table
 descriptors that are used at runtime is that any attribute defined this way can
 have an associated doc string simply by providing the text in the table.  An
 application can use the introspection API to retrieve the descriptor from the
-class object, and get the doc string using its :attr:`__doc__` attribute.
+class object, and get the doc string using its :attr:`!__doc__` attribute.
 
 As with the :c:member:`~PyTypeObject.tp_methods` table, a sentinel entry with a :c:member:`~PyMethodDef.ml_name` value
 of ``NULL`` is required.
@@ -473,7 +473,7 @@ instance of your data type. Here is a simple example::
        return result;
    }
 
-:c:type:`Py_hash_t` is a signed integer type with a platform-varying width.
+:c:type:`!Py_hash_t` is a signed integer type with a platform-varying width.
 Returning ``-1`` from :c:member:`~PyTypeObject.tp_hash` indicates an error,
 which is why you should be careful to avoid returning it when hash computation
 is successful, as seen above.
index e9d466d95e547e061d8156afde36bbb1fc17ad4b..4f7da27fbd350e6c470fcb8dcfc34c0e51f77845 100644 (file)
@@ -204,6 +204,10 @@ StreamReader
    directly; use :func:`open_connection` and :func:`start_server`
    instead.
 
+   .. method:: feed_eof()
+
+      Acknowledge the EOF.
+
    .. coroutinemethod:: read(n=-1)
 
       Read up to *n* bytes from the stream.
index 194a98696f437d9a831d214195dac14ac20bd84b..56aea6598b8615cda5fab6afffb4146d293fd8b7 100644 (file)
@@ -58,6 +58,15 @@ The following exception classes are defined in the :mod:`email.errors` module:
    :class:`~email.mime.nonmultipart.MIMENonMultipart` (e.g.
    :class:`~email.mime.image.MIMEImage`).
 
+.. exception:: MessageDefect()
+
+   This is the base class for all defects found when parsing email messages.
+   It is derived from :exc:`ValueError`.
+
+.. exception:: HeaderDefect()
+
+   This is the base class for all defects found when parsing email headers.
+   It is derived from :exc:`MessageDefect`.
 
 Here is the list of the defects that the :class:`~email.parser.FeedParser`
 can find while parsing messages.  Note that the defects are added to the message
index fdb546236aeadc584e67befa9576cb6a66c87691..f95df41d9f344c21e51a3a66c6bd7d917e1d35e6 100644 (file)
@@ -105,7 +105,7 @@ The module defines the following items:
    should only be provided in compression mode.  If omitted or ``None``, the
    current time is used.  See the :attr:`mtime` attribute for more details.
 
-   Calling a :class:`GzipFile` object's :meth:`close` method does not close
+   Calling a :class:`GzipFile` object's :meth:`!close` method does not close
    *fileobj*, since you might wish to append more material after the compressed
    data.  This also allows you to pass an :class:`io.BytesIO` object opened for
    writing as *fileobj*, and retrieve the resulting memory buffer using the
index 437da6927ab2f458513c93ac19f23ab41b38d44a..d338ce07a8a4b65477380a0cf3ce0069164c2ec6 100644 (file)
@@ -41,7 +41,7 @@ for example, a package and its resources can be imported from a zip file using
 ``get_resource_reader(fullname)`` method as specified by
 :class:`importlib.resources.abc.ResourceReader`.
 
-.. data:: Package
+.. class:: Package
 
     Whenever a function accepts a ``Package`` argument, you can pass in
     either a :class:`module object <types.ModuleType>` or a module name
@@ -58,7 +58,7 @@ for example, a package and its resources can be imported from a zip file using
     containers (think subdirectories).
 
     *package* is either a name or a module object which conforms to the
-    :data:`Package` requirements.
+    :class:`Package` requirements.
 
     .. versionadded:: 3.9
 
index 1e49b6568dfc2826ab5e6cfe5d7aa418b84996e9..909022ea4ba6a4bd256cc3f460c68d46ab47fed7 100644 (file)
@@ -73,7 +73,7 @@ decompression bomb         Safe                Safe                Safe
 1. Expat 2.4.1 and newer is not vulnerable to the "billion laughs" and
    "quadratic blowup" vulnerabilities. Items still listed as vulnerable due to
    potential reliance on system-provided libraries. Check
-   :const:`pyexpat.EXPAT_VERSION`.
+   :const:`!pyexpat.EXPAT_VERSION`.
 2. :mod:`xml.etree.ElementTree` doesn't expand external entities and raises a
    :exc:`~xml.etree.ElementTree.ParseError` when an entity occurs.
 3. :mod:`xml.dom.minidom` doesn't expand external entities and simply returns
index cb7558ce08e53c8c753f708efdf3366738b91849..8ae1ab62e695405d25777df8854ee24d519c74a5 100644 (file)
@@ -14,14 +14,12 @@ Doc/c-api/memory.rst
 Doc/c-api/memoryview.rst
 Doc/c-api/module.rst
 Doc/c-api/object.rst
-Doc/c-api/set.rst
 Doc/c-api/stable.rst
 Doc/c-api/structures.rst
 Doc/c-api/sys.rst
 Doc/c-api/type.rst
 Doc/c-api/typeobj.rst
 Doc/extending/extending.rst
-Doc/extending/newtypes.rst
 Doc/glossary.rst
 Doc/howto/descriptor.rst
 Doc/howto/enum.rst
@@ -33,7 +31,6 @@ Doc/library/abc.rst
 Doc/library/ast.rst
 Doc/library/asyncio-extending.rst
 Doc/library/asyncio-policy.rst
-Doc/library/asyncio-stream.rst
 Doc/library/asyncio-subprocess.rst
 Doc/library/asyncio-task.rst
 Doc/library/bdb.rst
@@ -55,7 +52,6 @@ Doc/library/dis.rst
 Doc/library/email.charset.rst
 Doc/library/email.compat32-message.rst
 Doc/library/email.errors.rst
-Doc/library/email.headerregistry.rst
 Doc/library/email.mime.rst
 Doc/library/email.parser.rst
 Doc/library/email.policy.rst
@@ -67,12 +63,10 @@ Doc/library/ftplib.rst
 Doc/library/functions.rst
 Doc/library/functools.rst
 Doc/library/gettext.rst
-Doc/library/gzip.rst
 Doc/library/http.client.rst
 Doc/library/http.cookiejar.rst
 Doc/library/http.cookies.rst
 Doc/library/http.server.rst
-Doc/library/importlib.resources.rst
 Doc/library/importlib.rst
 Doc/library/inspect.rst
 Doc/library/locale.rst
@@ -126,7 +120,6 @@ Doc/library/wsgiref.rst
 Doc/library/xml.dom.minidom.rst
 Doc/library/xml.dom.pulldom.rst
 Doc/library/xml.dom.rst
-Doc/library/xml.rst
 Doc/library/xml.sax.handler.rst
 Doc/library/xml.sax.reader.rst
 Doc/library/xml.sax.rst