Bug 894480 - Remove PyXML Dep from katello-cli
Remove PyXML Dep from katello-cli
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: katello-cli (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Suchý
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 843176
  Show dependency treegraph
 
Reported: 2013-01-11 15:43 EST by Toshio Ernie Kuratomi
Modified: 2013-03-14 12:42 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-14 12:42:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to switch katello-cli from PyXML to python-dateutil (809 bytes, patch)
2013-01-11 15:44 EST, 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 15:45 EST, Toshio Ernie Kuratomi
no flags Details | Diff

  None (edit)
Description Toshio Ernie Kuratomi 2013-01-11 15:43:37 EST
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 15:44:25 EST
Created attachment 677108 [details]
Patch to switch katello-cli from PyXML to python-dateutil
Comment 2 Toshio Ernie Kuratomi 2013-01-11 15:45:42 EST
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 03:48:42 EST
Thanks for patch and reporting.

Sent to upstream:
https://github.com/Katello/katello/pull/1389

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 12:58:19 EST
Hey, it's the end of February.  Do we have a new target for the release?
Comment 5 Toshio Ernie Kuratomi 2013-03-06 11:35:48 EST
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 03:31:52 EST
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 11:08:25 EDT
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 12:42:10 EDT
Now is the correct afternoon :)

Sorry.
Should be built now:
http://koji.fedoraproject.org/koji/taskinfo?taskID=5122298
http://koji.fedoraproject.org/koji/taskinfo?taskID=5122309

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