Adam Williamson added the comment:

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.

----------

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

Reply via email to