Bug 1408145

Summary: Doesn't work with Python 3.6
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: python-defusedxmlAssignee: Miro Hrončok <mhroncok>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: bkabrda, kevin, mhroncok, puiterwijk, python-sig, rbean, torsava
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-22 21:01:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Adam Williamson 2016-12-22 09:59:19 UTC
defusedxml is not really compatible with Python 3.6. There was a significant change upstream in how `xml.etree.ElementTree.iterparse` is implemented, and defusedxml simply cannot cope with that. A partial fix has been committed upstream, but the relevant code still doesn't actually work properly. I have filed an upstream issue for this: https://github.com/tiran/defusedxml/issues/3

I ran into this while trying to rebuild python-fedmsg-meta-fedora-infrastructure ; there's a dep chain which runs:

python-fedmsg-meta-fedora-infrastructure
python-fedora
python3-openid
python-defusedxml

and defusedxml fails. So as well as fedmsg-meta, openid and fedora and anything else that uses those is broken till this can be fixed.

Comment 1 Miro Hrončok 2016-12-22 10:28:39 UTC
Thanks for the upstream issue. In the rebuilding rush I haven't noticed one of the packages that fail is mine.

Comment 2 Adam Williamson 2016-12-22 17:51:26 UTC
I also reported to python.org, on the basis that the docs for 'xml' explicitly endorse the use of 'defusedxml': https://bugs.python.org/issue29050

Comment 3 Adam Williamson 2016-12-22 21:01:06 UTC
Well, with the benefit of a bit of sleep and coffee and some insights from puiterwijk, I came up with (I think) a proper fix for this, and sent it upstream:

https://github.com/tiran/defusedxml/pull/4
https://koji.fedoraproject.org/koji/taskinfo?taskID=17031413