Author adamwill
Recipients adamwill, ammar2, christian.heimes, serhiy.storchaka
Date 2016-12-22.20:03:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1482437024.11.0.729669356712.issue29050@psf.upfronthosting.co.za>
In-reply-to
Content
serhiy: so, the funny thing is this: your fix is ultimately a reversion. Though we have to dig way back into the bowels of defusedxml to see this. Specifically, to this commit!

https://github.com/tiran/defusedxml/commit/03d4fc6cf246a209c2cf892b33f5b6cf5af4ecbd

that's the point at which Christian introduced a divergence between Python 2 and Python 3 here, and essentially the same divergence remains between the `elif PY3:` and `else: # Python 2.7` blocks now. The Python 2.7 block in current defusedxml is in fact the same as your block, because `_iterparse` is just the parent `iterparse` function, as discovered by `_get_py3_cls()`.

So before applying your change, I kinda want to understand why Christian introduced this divergence in the first place. The commit message claims it's because Python 3.3 hid some pure python, but I don't quite understand that: https://github.com/python/cpython/blob/3.3/Lib/xml/etree/ElementTree.py looks like iterparse() was still perfectly available and usable for this purpose in 3.3, just as it was in 3.2 and still appears to be in 3.6.
History
Date User Action Args
2016-12-22 20:03:44adamwillsetrecipients: + adamwill, christian.heimes, serhiy.storchaka, ammar2
2016-12-22 20:03:44adamwillsetmessageid: <1482437024.11.0.729669356712.issue29050@psf.upfronthosting.co.za>
2016-12-22 20:03:44adamwilllinkissue29050 messages
2016-12-22 20:03:43adamwillcreate