8000 pyexpat: Expose error code XML_ERROR_NOT_STARTED of Expat >=2.6.4 · python/cpython@090f254 · GitHub
[go: up one dir, main page]

Skip to content

Commit 090f254

Browse files
committed
pyexpat: Expose error code XML_ERROR_NOT_STARTED of Expat >=2.6.4
1 parent 6293d00 commit 090f254

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

Doc/library/pyexpat.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,11 @@ The ``errors`` module has the following attributes:
941941
has been breached.
942942

943943

944+
.. data:: XML_ERROR_NOT_STARTED
945+
946+
The parser was tried to be stopped or suspended before it started.
947+
948+
944949
.. rubric:: Footnotes
945950

946951
.. [1] The encoding string included in XML output should conform to the
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Expose error code ``XML_ERROR_NOT_STARTED`` of Expat >=2.6.4 in :mod:`xml.parsers.expat.errors`.

Modules/pyexpat.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1767,7 +1767,10 @@ struct ErrorInfo error_info_of[] = {
17671767
{"XML_ERROR_NO_BUFFER", "a successful prior call to function XML_GetBuffer is required"},
17681768

17691769
/* Added in 2.4.0. */
1770-
{"XML_ERROR_AMPLIFICATION_LIMIT_BREACH", "limit on input amplification factor (from DTD and entities) breached"}
1770+
{"XML_ERROR_AMPLIFICATION_LIMIT_BREACH", "limit on input amplification factor (from DTD and entities) breached"},
1771+
1772+
/* Added in 2.6.4. */
1773+
{"XML_ERROR_NOT_STARTED", "parser not started"},
17711774
};
17721775

17731776
static int

0 commit comments

Comments
 (0)
0