This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Martin Hosken, eli.bendersky, scoder, serhiy.storchaka, xtreak
Date 2018-09-11.18:58:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1536692293.59.0.0269046726804.issue34600@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-09-11 18:58:13serhiy.storchakasetrecipients: + serhiy.storchaka, scoder, eli.bendersky, xtreak, Martin Hosken
2018-09-11 18:58:13serhiy.storchakasetmessageid: <1536692293.59.0.0269046726804.issue34600@psf.upfronthosting.co.za>
2018-09-11 18:58:13serhiy.storchakalinkissue34600 messages
2018-09-11 18:58:13serhiy.storchakacreate