Bug 894480 - Remove PyXML Dep from katello-cli
Summary: Remove PyXML Dep from katello-cli
Alias: None
Product: Fedora
Classification: Fedora
Component: katello-cli
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: 843176
TreeView+ depends on / blocked
Reported: 2013-01-11 20:43 UTC by Toshio Ernie Kuratomi
Modified: 2013-03-14 16:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-03-14 16:42:10 UTC
Type: Bug

Attachments (Terms of Use)
Patch to switch katello-cli from PyXML to python-dateutil (809 bytes, patch)
2013-01-11 20:44 UTC, Toshio Ernie Kuratomi
no flags Details | Diff
Patch for spec file to remove PyXML dep and add python-dateutil (508 bytes, patch)
2013-01-11 20:45 UTC, Toshio Ernie Kuratomi
no flags Details | Diff

Description Toshio Ernie Kuratomi 2013-01-11 20:43:37 UTC
Description of problem:
I've opened up a Fedora 19 Feature to remove PyXML due to a combination of it being dead upstream for many years and that when it's installed, the python stdlib overwrites its own xml module with PyXML.  This combination leads to errors because PyXML's code is older and contains bugs that have been fixed in the stdlib.

I've taken a look at why katello-cli has a dependency on PyXML and it looks like it is due to one usage of the xml module for parsing dates:

$ grep -ri xml . |grep import
./src/katello/client/core/utils.py:from xml.utils import iso8601

There was a similar issue with the subscription-manager package: https://bugzilla.redhat.com/show_bug.cgi?id=844072

I'll attach a patch that should port katello-cli from using PyXML to using python-dateutil

Comment 1 Toshio Ernie Kuratomi 2013-01-11 20:44:25 UTC
Created attachment 677108 [details]
Patch to switch katello-cli from PyXML to python-dateutil

Comment 2 Toshio Ernie Kuratomi 2013-01-11 20:45:42 UTC
Created attachment 677109 [details]
Patch for spec file to remove PyXML dep and add python-dateutil

Here's the spec file update that goes along with this.  Note that the current version of katello-cli in the rawhide repo seems to fail build for an unrelated reason.

Comment 3 Miroslav Suchý 2013-01-14 08:48:42 UTC
Thanks for patch and reporting.

Sent to upstream:

I expect that when Katello 1.3 is released (due in February) that this code will get to Fedora 19.

Comment 4 Toshio Ernie Kuratomi 2013-02-28 17:58:19 UTC
Hey, it's the end of February.  Do we have a new target for the release?

Comment 5 Toshio Ernie Kuratomi 2013-03-06 16:35:48 UTC
If we don't have a release date, may I update the fedora Rawhide package with the patch?  This is the last package blocking the remove PyXML Feature: https://fedoraproject.org/wiki/Features/RemovePyXML

I'd like to remove PyXML from rawhide before Alpha so that we have more testing that the removal doesn't break anything.  If I remove it without this package being fixed, katello will be broken.  I don't really want to stop katello from getting testing at alpha when the fix is right here and has been pulled into the upstream tree :-)

Comment 6 Miroslav Suchý 2013-03-07 08:31:52 UTC
The release date is still not set.
OK. I will push new package from katello nightly to rawhide this afternoon.

Comment 7 Toshio Ernie Kuratomi 2013-03-14 15:08:25 UTC
Thanks!  But a repoquery on rawhide shows that katello is still requiring PyXML:

$ repoquery -q --tree-whatrequires PyXML
PyXML-0:0.8.4-29.fc19.x86_64 [cmd line]
 \_  katello-cli-common-0:1.1.10-1.fc19.noarch [1: PyXML = 0.8.4-29.fc19]
 |   \_  katello-cli-0:1.1.10-1.fc19.noarch [1: katello-cli-common = 1.1.10-1.fc19]
 |   |   \_  katello-cli-unit-tests-0:1.1.10-1.fc19.noarch [1: katello-cli = 1.1.10-1.fc19]
 \_  katello-cli-unit-tests-0:1.1.10-1.fc19.noarch [1: PyXML = 0.8.4-29.fc19]

Comment 8 Miroslav Suchý 2013-03-14 16:42:10 UTC
Now is the correct afternoon :)

Should be built now:

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