gh-101100: Fix Sphinx reference warnings (GH-112416)

* Fix Sphinx warning in library/xml.rst

Direct use of the pyexpat module is deprecated, but this is how to check the version for security purposes

* Fix Sphinx warning in library/importlib.resources.rst

* Use italics for parameters

* Link to the exception

* Fix Sphinx warning in library/gzip.rst

* Document message and header defect base classes to fix Sphinx warning in library/email.headerregistry.rst

* Restore feed_eof() doc to fix Sphinx warning in library/asyncio-stream.rst

* Fix Sphinx warning in extending/newtypes.rst

* Fix Sphinx warning in c-api/set.rst

On stdtypes.rst, set and frozenset are documented together and the frozenset has the working refs
This commit is contained in:
Hugo van Kemenade 2023-11-26 01:40:19 +02:00 committed by GitHub
parent 97f8f28b3e
commit 3faf8e586d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 23 additions and 17 deletions

View 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