8000 gh-126624: Expose error code ``XML_ERROR_NOT_STARTED`` of Expat >=2.6.4 by hartwork · Pull Request #126625 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

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

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Doc/library/pyexpat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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`.
5 changes: 4 additions & 1 deletion Modules/pyexpat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading
0