Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8e48a6e

Browse files
hartworkpicnixz
andauthored
gh-126624: Expose error codeXML_ERROR_NOT_STARTED of Expat >=2.6.4 (#126625)
Expose error code ``XML_ERROR_NOT_STARTED`` in `xml.parsers.expat.errors` which wasintroduced in Expat 2.6.4.Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
1 parenta3711d1 commit8e48a6e

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

‎Doc/library/pyexpat.rst‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,13 @@ 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+
..versionadded::next
949+
950+
944951
..rubric::Footnotes
945952

946953
.. [1]The encoding string included in XML output should conform to the
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Expose error code:data:`~xml.parsers.expat.errors.XML_ERROR_NOT_STARTED`
2+
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
staticint

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp