gh-126624: Expose error code `XML_ERROR_NOT_STARTED` of Expat >=2.6.4 (#126625)

Expose error code ``XML_ERROR_NOT_STARTED`` in `xml.parsers.expat.errors` which was
introduced in Expat 2.6.4.


Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This commit is contained in:
Sebastian Pipping 2025-01-02 13:54:38 +01:00 committed by GitHub
parent a3711d1541
commit 8e48a6edc7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 1 deletions

View file

@ -941,6 +941,13 @@ The ``errors`` module has the following attributes:
has been breached.
.. data:: XML_ERROR_NOT_STARTED
The parser was tried to be stopped or suspended before it started.
.. versionadded:: next
.. rubric:: Footnotes
.. [1] The encoding string included in XML output should conform to the

View file

@ -0,0 +1,2 @@
Expose error code :data:`~xml.parsers.expat.errors.XML_ERROR_NOT_STARTED`
of Expat >=2.6.4 in :mod:`xml.parsers.expat.errors`.

View file

@ -1767,7 +1767,10 @@ struct ErrorInfo error_info_of[] = {
{"XML_ERROR_NO_BUFFER", "a successful prior call to function XML_GetBuffer is required"},
/* Added in 2.4.0. */
{"XML_ERROR_AMPLIFICATION_LIMIT_BREACH", "limit on input amplification factor (from DTD and entities) breached"}
{"XML_ERROR_AMPLIFICATION_LIMIT_BREACH", "limit on input amplification factor (from DTD and entities) breached"},
/* Added in 2.6.4. */
{"XML_ERROR_NOT_STARTED", "parser not started"},
};
static int