From fb2cf16e45a0d877531c0034c8b6bd4e96165e99 Mon Sep 17 00:00:00 2001 From: manoj Date: Tue, 23 Jun 2026 10:27:45 +0530 Subject: [PATCH 1/5] Fix incorrect interface names in xml.sax.rst --- Doc/library/xml.sax.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/library/xml.sax.rst b/Doc/library/xml.sax.rst index 77234cac5d92ad..ce7a31739f1c4a 100644 --- a/Doc/library/xml.sax.rst +++ b/Doc/library/xml.sax.rst @@ -79,10 +79,10 @@ instantiated by the application itself. Since Python does not have an explicit notion of interface, they are formally introduced as classes, but applications may use implementations which do not inherit from the provided classes. The :class:`~xml.sax.xmlreader.InputSource`, :class:`~xml.sax.xmlreader.Locator`, -:class:`~xml.sax.xmlreader.Attributes`, :class:`~xml.sax.xmlreader.AttributesNS`, -and :class:`~xml.sax.xmlreader.XMLReader` interfaces are defined in the -module :mod:`xml.sax.xmlreader`. The handler interfaces are defined in -:mod:`xml.sax.handler`. For convenience, +:class:`~xml.sax.xmlreader.AttributesImpl`, +:class:`~xml.sax.xmlreader.AttributesNSImpl`, and :class:`~xml.sax.xmlreader.XMLReader` +interfaces are defined in the module :mod:`xml.sax.xmlreader`. +The handler interfaces are defined in :mod:`xml.sax.handler`. For convenience, :class:`~xml.sax.xmlreader.InputSource` (which is often instantiated directly) and the handler classes are also available from :mod:`!xml.sax`. These interfaces are described below. From 456066e7ace89aa44e5bf4db19f5b5e74dfff1ff Mon Sep 17 00:00:00 2001 From: manoj Date: Thu, 2 Jul 2026 17:53:10 +0530 Subject: [PATCH 2/5] Fix references to Attribute interfaces and create reference for parser modules in xml.sax.rst and xml.sax.reader.rst respectively --- Doc/library/xml.sax.reader.rst | 2 ++ Doc/library/xml.sax.rst | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Doc/library/xml.sax.reader.rst b/Doc/library/xml.sax.reader.rst index 1a5ab6a214f819..54495c74a40e0c 100644 --- a/Doc/library/xml.sax.reader.rst +++ b/Doc/library/xml.sax.reader.rst @@ -8,6 +8,8 @@ -------------- +.. _sax-parser-modules: + SAX parsers implement the :class:`XMLReader` interface. They are implemented in a Python module, which must provide a function :func:`create_parser`. This function is invoked by :func:`xml.sax.make_parser` with no arguments to create diff --git a/Doc/library/xml.sax.rst b/Doc/library/xml.sax.rst index ce7a31739f1c4a..74e8bae7dea4b8 100644 --- a/Doc/library/xml.sax.rst +++ b/Doc/library/xml.sax.rst @@ -79,7 +79,8 @@ instantiated by the application itself. Since Python does not have an explicit notion of interface, they are formally introduced as classes, but applications may use implementations which do not inherit from the provided classes. The :class:`~xml.sax.xmlreader.InputSource`, :class:`~xml.sax.xmlreader.Locator`, -:class:`~xml.sax.xmlreader.AttributesImpl`, +:ref:`Attributes `, +:ref:`AttributesNS `, :class:`~xml.sax.xmlreader.AttributesNSImpl`, and :class:`~xml.sax.xmlreader.XMLReader` interfaces are defined in the module :mod:`xml.sax.xmlreader`. The handler interfaces are defined in :mod:`xml.sax.handler`. For convenience, From 19f576e1731f97c0755b793003465b396a76b86d Mon Sep 17 00:00:00 2001 From: manoj Date: Thu, 2 Jul 2026 17:55:05 +0530 Subject: [PATCH 3/5] remove repeatition of attributesNS --- Doc/library/xml.sax.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/xml.sax.rst b/Doc/library/xml.sax.rst index 74e8bae7dea4b8..b002888611115c 100644 --- a/Doc/library/xml.sax.rst +++ b/Doc/library/xml.sax.rst @@ -81,7 +81,7 @@ may use implementations which do not inherit from the provided classes. The :class:`~xml.sax.xmlreader.InputSource`, :class:`~xml.sax.xmlreader.Locator`, :ref:`Attributes `, :ref:`AttributesNS `, -:class:`~xml.sax.xmlreader.AttributesNSImpl`, and :class:`~xml.sax.xmlreader.XMLReader` +and :class:`~xml.sax.xmlreader.XMLReader` interfaces are defined in the module :mod:`xml.sax.xmlreader`. The handler interfaces are defined in :mod:`xml.sax.handler`. For convenience, :class:`~xml.sax.xmlreader.InputSource` (which is often From e64e3f4541bc6654d1fc4eeece4ce4b99825b24f Mon Sep 17 00:00:00 2001 From: manoj Date: Thu, 2 Jul 2026 17:58:04 +0530 Subject: [PATCH 4/5] Fix spacings --- Doc/library/xml.sax.rst | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Doc/library/xml.sax.rst b/Doc/library/xml.sax.rst index b002888611115c..002c7bbcc22a0c 100644 --- a/Doc/library/xml.sax.rst +++ b/Doc/library/xml.sax.rst @@ -79,14 +79,12 @@ instantiated by the application itself. Since Python does not have an explicit notion of interface, they are formally introduced as classes, but applications may use implementations which do not inherit from the provided classes. The :class:`~xml.sax.xmlreader.InputSource`, :class:`~xml.sax.xmlreader.Locator`, -:ref:`Attributes `, -:ref:`AttributesNS `, -and :class:`~xml.sax.xmlreader.XMLReader` -interfaces are defined in the module :mod:`xml.sax.xmlreader`. -The handler interfaces are defined in :mod:`xml.sax.handler`. For convenience, -:class:`~xml.sax.xmlreader.InputSource` (which is often -instantiated directly) and the handler classes are also available from -:mod:`!xml.sax`. These interfaces are described below. +:ref:`Attributes `,:ref:`AttributesNS `, +and :class:`~xml.sax.xmlreader.XMLReader` interfaces are defined in the module +:mod:`xml.sax.xmlreader`. The handler interfaces are defined in +:mod:`xml.sax.handler`. For convenience, :class:`~xml.sax.xmlreader.InputSource` +(which is often instantiated directly) and the handler classes are also available +from :mod:`!xml.sax`. These interfaces are described below. In addition to these classes, :mod:`!xml.sax` provides the following exception classes. From b0946067b55dba28f3cd2bff2ee9c3e5835ab167 Mon Sep 17 00:00:00 2001 From: manoj Date: Fri, 3 Jul 2026 06:30:10 +0530 Subject: [PATCH 5/5] Add reference to create_parser(), fix spacing in xml.sax.rst --- Doc/library/xml.sax.rst | 12 ++++++------ Doc/tools/.nitignore | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Doc/library/xml.sax.rst b/Doc/library/xml.sax.rst index 002c7bbcc22a0c..e472b10d69a51f 100644 --- a/Doc/library/xml.sax.rst +++ b/Doc/library/xml.sax.rst @@ -34,10 +34,10 @@ The convenience functions are: .. function:: make_parser(parser_list=[]) Create and return a SAX :class:`~xml.sax.xmlreader.XMLReader` object. The - first parser found will - be used. If *parser_list* is provided, it must be an iterable of strings which - name modules that have a function named :func:`create_parser`. Modules listed - in *parser_list* will be used before modules in the default list of parsers. + first parser found will be used. If *parser_list* is provided, it must be + an iterable of strings which name modules that have a function named + :ref:`create_parser `. Modules listed in *parser_list* + will be used before modules in the default list of parsers. .. versionchanged:: 3.8 The *parser_list* argument can be any iterable, not just a list. @@ -79,9 +79,9 @@ instantiated by the application itself. Since Python does not have an explicit notion of interface, they are formally introduced as classes, but applications may use implementations which do not inherit from the provided classes. The :class:`~xml.sax.xmlreader.InputSource`, :class:`~xml.sax.xmlreader.Locator`, -:ref:`Attributes `,:ref:`AttributesNS `, +:ref:`Attributes `, :ref:`AttributesNS `, and :class:`~xml.sax.xmlreader.XMLReader` interfaces are defined in the module -:mod:`xml.sax.xmlreader`. The handler interfaces are defined in +:mod:`xml.sax.xmlreader`. The handler interfaces are defined in :mod:`xml.sax.handler`. For convenience, :class:`~xml.sax.xmlreader.InputSource` (which is often instantiated directly) and the handler classes are also available from :mod:`!xml.sax`. These interfaces are described below. diff --git a/Doc/tools/.nitignore b/Doc/tools/.nitignore index 2255c745c00383..2a88a5086b872c 100644 --- a/Doc/tools/.nitignore +++ b/Doc/tools/.nitignore @@ -32,7 +32,6 @@ Doc/library/xml.dom.minidom.rst Doc/library/xml.dom.pulldom.rst Doc/library/xml.dom.rst Doc/library/xml.sax.reader.rst -Doc/library/xml.sax.rst Doc/library/xmlrpc.client.rst Doc/library/xmlrpc.server.rst Doc/whatsnew/2.4.rst