STINNER Victor added the comment:
Instead of having to check if an exception is set in each Python
callback, it would be better to stop the XML parser.
I created the issue #18733 to track this optimization.
The initial issue is fixed, so I'm closing it.
--
resolution: - fixed
New submission from STINNER Victor:
The ElementTree module allows to write a XML parser using Python callbacks. The
module relies on the expat library which is implemented in C. Expat calls these
Python callbacks, but ElementTree does not check if a Python exception was
raised or not.
STINNER Victor added the comment:
For the issue #18408, I added assertions in PyEval_EvalFrameEx() and similar
functions to exit with an assertion error in debug mode if these functions are
called with an exception set:
New changeset 48a869a39e2d by Victor Stinner in branch 'default':
Issue
Changes by Christian Heimes li...@cheimes.de:
--
nosy: +christian.heimes
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18501
___
___
Changes by Fred L. Drake, Jr. fdr...@gmail.com:
--
nosy: +fdrake
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18501
___
___
Python-bugs-list
Roundup Robot added the comment:
New changeset 5a6cdc0d7de1 by Victor Stinner in branch 'default':
Issue #18501, #18408: Fix expat handlers in pyexpat, don't call Python
http://hg.python.org/cpython/rev/5a6cdc0d7de1
--
nosy: +python-dev
___
Python
STINNER Victor added the comment:
See also the issue #18488, similar issue in sqlite.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18501
___