Bug 843707 - Work on removing PyXML dep
Summary: Work on removing PyXML dep
Alias: None
Product: Fedora
Classification: Fedora
Component: bkchem
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: 843176
TreeView+ depends on / blocked
Reported: 2012-07-27 06:28 UTC by Toshio Ernie Kuratomi
Modified: 2013-02-21 06:20 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-02-21 06:20:07 UTC
Type: Bug

Attachments (Terms of Use)

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

Note You need to log in before you can comment on or make changes to this bug.