Repository navigation
gh-151943: Fix Sphinx reference warnings in Doc/library/xml.sax*.rst #162794
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -9,7 +9,7 @@ | |||||
| -------------- | ||||||
|
|
||||||
| SAX parsers implement the :class:`XMLReader` interface. They are implemented in | ||||||
| a Python module, which must provide a function :func:`create_parser`. This | ||||||
| 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 | ||||||
| a new parser object. | ||||||
|
|
||||||
|
|
@@ -23,9 +23,9 @@ a new parser object. | |||||
|
|
||||||
| In some cases, it is desirable not to parse an input source at once, but to feed | ||||||
| chunks of the document as they get available. Note that the reader will normally | ||||||
| not read the entire file, but read it in chunks as well; still :meth:`parse` | ||||||
| not read the entire file, but read it in chunks as well; still :meth:`~XMLReader.parse` | ||||||
| won't return until the entire document is processed. So these interfaces should | ||||||
| be used if the blocking behaviour of :meth:`parse` is not desirable. | ||||||
| be used if the blocking behaviour of :meth:`~XMLReader.parse` is not desirable. | ||||||
|
|
||||||
| When the parser is instantiated it is ready to begin accepting data from the | ||||||
| feed method immediately. After parsing has been finished with a call to close | ||||||
|
|
@@ -70,7 +70,7 @@ a new parser object. | |||||
|
|
||||||
| This is an implementation of the :class:`Attributes` interface (see section | ||||||
| :ref:`attributes-objects`). This is a dictionary-like object which | ||||||
| represents the element attributes in a :meth:`startElement` call. In addition | ||||||
| represents the element attributes in a :meth:`~xml.sax.handler.ContentHandler.startElement` call. In addition | ||||||
| to the most useful dictionary operations, it supports a number of other | ||||||
| methods as described by the interface. Objects of this class should be | ||||||
| instantiated by readers; *attrs* must be a dictionary-like object containing | ||||||
|
|
@@ -80,7 +80,7 @@ a new parser object. | |||||
| .. class:: AttributesNSImpl(attrs, qnames) | ||||||
|
|
||||||
| Namespace-aware variant of :class:`AttributesImpl`, which will be passed to | ||||||
| :meth:`startElementNS`. It is derived from :class:`AttributesImpl`, but | ||||||
| :meth:`~xml.sax.handler.ContentHandler.startElementNS`. It is derived from :class:`AttributesImpl`, but | ||||||
| understands attribute names as two-tuples of *namespaceURI* and | ||||||
| *localname*. In addition, it provides a number of methods expecting qualified | ||||||
| names as they appear in the original document. This class implements the | ||||||
|
|
@@ -171,29 +171,29 @@ The :class:`XMLReader` interface supports the following methods: | |||||
| .. method:: XMLReader.getFeature(featurename) | ||||||
|
|
||||||
| Return the current setting for feature *featurename*. If the feature is not | ||||||
| recognized, :exc:`SAXNotRecognizedException` is raised. The well-known | ||||||
| recognized, :exc:`~xml.sax.SAXNotRecognizedException` is raised. The well-known | ||||||
| featurenames are listed in the module :mod:`xml.sax.handler`. | ||||||
|
|
||||||
|
|
||||||
| .. method:: XMLReader.setFeature(featurename, value) | ||||||
|
|
||||||
| Set the *featurename* to *value*. If the feature is not recognized, | ||||||
| :exc:`SAXNotRecognizedException` is raised. If the feature or its setting is not | ||||||
| supported by the parser, *SAXNotSupportedException* is raised. | ||||||
| :exc:`~xml.sax.SAXNotRecognizedException` is raised. If the feature or its setting is not | ||||||
| supported by the parser, :exc:`~xml.sax.SAXNotSupportedException` is raised. | ||||||
|
|
||||||
|
|
||||||
| .. method:: XMLReader.getProperty(propertyname) | ||||||
|
|
||||||
| Return the current setting for property *propertyname*. If the property is not | ||||||
| recognized, a :exc:`SAXNotRecognizedException` is raised. The well-known | ||||||
| recognized, a :exc:`~xml.sax.SAXNotRecognizedException` is raised. The well-known | ||||||
| propertynames are listed in the module :mod:`xml.sax.handler`. | ||||||
|
|
||||||
|
|
||||||
| .. method:: XMLReader.setProperty(propertyname, value) | ||||||
|
|
||||||
| Set the *propertyname* to *value*. If the property is not recognized, | ||||||
| :exc:`SAXNotRecognizedException` is raised. If the property or its setting is | ||||||
| not supported by the parser, *SAXNotSupportedException* is raised. | ||||||
| :exc:`~xml.sax.SAXNotRecognizedException` is raised. If the property or its setting is | ||||||
| not supported by the parser, :exc:`~xml.sax.SAXNotSupportedException` is raised. | ||||||
|
|
||||||
|
|
||||||
| .. _incremental-parser-objects: | ||||||
|
|
@@ -339,12 +339,14 @@ InputSource Objects | |||||
| The :class:`Attributes` Interface | ||||||
| --------------------------------- | ||||||
|
|
||||||
| :class:`Attributes` objects implement a portion of the :term:`mapping protocol | ||||||
| <mapping>`, including the methods :meth:`~collections.abc.Mapping.copy`, | ||||||
| :meth:`~collections.abc.Mapping.get`, :meth:`~object.__contains__`, | ||||||
| :meth:`~collections.abc.Mapping.items`, :meth:`~collections.abc.Mapping.keys`, | ||||||
| and :meth:`~collections.abc.Mapping.values`. The following methods | ||||||
| are also provided: | ||||||
| .. class:: Attributes() | ||||||
|
|
||||||
| :class:`Attributes` objects implement a portion of the :term:`mapping protocol | ||||||
| <mapping>`, including the methods :meth:`!copy`, | ||||||
| :meth:`!get`, :meth:`~object.__contains__`, | ||||||
| :meth:`!items`, :meth:`!keys`, | ||||||
| and :meth:`!values`. The following methods | ||||||
| are also provided: | ||||||
|
|
||||||
|
|
||||||
| .. method:: Attributes.getLength() | ||||||
|
|
@@ -375,11 +377,13 @@ are also provided: | |||||
| The :class:`AttributesNS` Interface | ||||||
| ----------------------------------- | ||||||
|
|
||||||
| This interface is a subtype of the :class:`Attributes` interface (see section | ||||||
| :ref:`attributes-objects`). All methods supported by that interface are also | ||||||
| available on :class:`AttributesNS` objects. | ||||||
| .. class:: AttributesNS() | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is still not changed. |
||||||
|
|
||||||
| This interface is a subtype of the :class:`Attributes` interface (see section | ||||||
| :ref:`attributes-objects`). All methods supported by that interface are also | ||||||
| available on :class:`AttributesNS` objects. | ||||||
|
|
||||||
| The following methods are also available: | ||||||
| The following methods are also available: | ||||||
|
|
||||||
|
|
||||||
| .. method:: AttributesNS.getValueByQName(name) | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,7 +36,7 @@ The convenience functions and data are: | |
| 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 | ||
| name modules that have a function named :func:`!create_parser`. Modules listed | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Semantically, it shouldn't be a function role but a plain backquote. |
||
| in *parser_list* will be used before modules in the default list of parsers. | ||
|
|
||
| .. versionchanged:: 3.8 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.