Bug 843707

Summary: Work on removing PyXML dep
Product: [Fedora] Fedora Reporter: Toshio Ernie Kuratomi <a.badger>
Component: bkchemAssignee: Gwyn Ciesla <gwync>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: gwync, mtasaka, terje.rosten
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 06:20:07 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:
Bug Depends On:    
Bug Blocks: 843176    

Description Toshio Ernie Kuratomi 2012-07-27 06:28:53 UTC
Description of problem:
We're trying to remove PyXML from Fedora 18 since it's dead upstream and when it's installed the python stdlib overwrites its own xml module with the code from PyXML.  That overwriting with old code can cause errors on newer python.

Looking at the code for bkchem and some documentation in the tarball, it looks like the bkchem upstream did some work to remove dependence on PyXML.  I found code importing xml.dom.minidom and xml.sax both of which are present in the stdlib.

I also found one plugin that makes use of xml.xpath: bkchem/plugins/gtml.py ("GTML import-export plugin").  xml.xpath is a PyXML extension so this plugin will not work if PyXML is not installed.

Some questions:

* What's the impact if we don't ship this plugin?
* Would upstream be willing to port?
* If we/I port this for upstream, would they be amenable to adding a different library dependency?  I have heard that lxml is a good library for adding xpath support to an application (there is no module with xpath support in the stdlib).

Comment 1 Gwyn Ciesla 2012-07-27 16:00:09 UTC
Let me play with it.  I'm not sure at third, fourth glance.  I didn't see any mention of it in the UI, so naturally I dug into the code, and I see the file, but I don't see it called from anywhere.  I see gtml references as a dir and in function names, but I don't see anything that calls, imports, or refers to it, except for bkchem/plugins/__init__.py line 23, where a comment references it's removal.  So dropping the dep and doing nothing otherwise might be a NOOP.

In the mean time see if you can find any holes in the above.

Comment 2 Gwyn Ciesla 2012-07-27 16:34:39 UTC
BTW, by the "it" in the 3rd sentence, I mean the gtml plugin.

And I did a local build without the PyXML dep, installed, and removed PyXML, and I saw no change in behaviour.

Comment 3 Toshio Ernie Kuratomi 2013-01-11 19:46:06 UTC
Cool.  Can we remove the dep on PyXML in the rawhide packages then?  I have opened an F19 Feature for removing PyXML so it seems like a good time to do that and make sure no one else reports breakage.

Comment 4 Gwyn Ciesla 2013-01-15 12:41:37 UTC
Done.