Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

Than your for your example Martin. Now I see what is not working. Indeed, using 
the TreeBuilder subclass is recommended way, but iterparse() was designed to 
accept only exact TreeBuilder. Actually there is an intention to consider the 
parser parameter of iterparse() as internal and remove it from the public API 
(also the deprecation warning is not emitted yet).

I don't see a way to fix this. Since this feature never worked in Python 3, and 
the Python 2 way looks as using implementation details, I think we should 
consider adding it as a new feature rather of a buf fix. Adding support of 
"comment" and "pi" as event types in iterparse looks reasonable to me. Eli, 
what are your thoughts?

I agree with you Marting that using your own copy from the source code is the 
best way of solving your problem on current Python 3.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34600>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to