[issue18902] Make ET event handling more modular to allow custom targets for the non-blocking parser
Eli Bendersky
report at bugs.python.org
Mon Sep 2 02:03:41 CEST 2013
New submission from Eli Bendersky:
As issue #17741 shows in detail, there's a number of implementation problems in the current ET that make a fully non-blocking parser more difficult to implement than it should be.
The main problem is that XMLParser._setevents relies on internal implementation details of the default TreeBuilder to do some of its tasks.
This has to be decoupled from implementation details completely. An XMLParser already has a non-blocking input side (feed/close) and a callback "push" API to the target. The API has to be fully expanded to include start-ns/end-ns and any other events that are required to allow custom tree builders as targets. This would make it possible to layer XMLPullParser on top of the stock XMLParser coupled with a special target that collects "events" from the callback calls.
----------
components: Library (Lib)
messages: 196758
nosy: eli.bendersky
priority: normal
severity: normal
stage: needs patch
status: open
title: Make ET event handling more modular to allow custom targets for the non-blocking parser
type: behavior
versions: Python 3.4, Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18902>
_______________________________________
More information about the Python-bugs-list
mailing list