Bug 844533 - Work on removing PyXML dependency
Summary: Work on removing PyXML dependency
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: spacewalk-backend
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 843176 844603
TreeView+ depends on / blocked
 
Reported: 2012-07-31 02:48 UTC by Toshio Ernie Kuratomi
Modified: 2015-01-14 13:48 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 844603 (view as bug list)
Environment:
Last Closed: 2015-01-14 13:48:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Toshio Ernie Kuratomi 2012-07-31 02:48:17 UTC
Description of problem:

For Fedora 18 we're trying to get rid of PyXML in the distribution[1]_.  The reason is that PyXML has been dead upstream for a long time and it has the dubious behaviour of overwriting the python stdlib's xml module with its own code.  The combination of these two means that code that uses the stdlib's xml module can sometimes be broken by installing the PyXML package (because of old bugs or old code in PyXML that hasn't been ported to newer python versions).

I've taken a look at spacewalk-backend-tools which has a Requires: PyXML and found two places that PyXML/the stdlib xml module is used, both in unittests:

./satellite_tools/test/testxmlparser.py:from xml.sax import make_parser, saxutils
./satellite_tools/test/testxmlparser.py:from xml.sax.handler import feature_namespaces
./satellite_tools/test/testxmlparser.py:from xml.unicode.utf8_iso import utf8_to_code

./satellite_tools/test/testxmlwriter.py:from xml.sax.saxutils import escape
./satellite_tools/test/testxmlwriter.py:from xml.unicode.utf8_iso import code_to_utf8
./satellite_tools/test/testxmlwriter.py:import xml.sax.writer

Of these, most of the API being used is present in stdlib xml module (but I don't know if the behaviour matches).  Only unicode.utf8_iso.* and xml.sax.writer are not present.

Looking at ./satellite_tools/test/testxmlwriter.py, I'm not sure that this file is even testing any code in satellite/spacewalk.  It doesn't import any spacewalk code.  It does write an xml file that may be used by some other tests.  However, I can't find any file that invokes it and in addition, it doesn't appear to be runnable:

python testxmlwriter.py
  File "testxmlwriter.py", line 65
SyntaxError: Non-ASCII character '\xa9' in file testxmlwriter.py on line 65, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

./satellite_tools/test/testxmlparser.py also doesn't look like it is testing any sattellite/spacewalk code.  If necessary, it's use of utf8_to_code looks like it may be possible to port to something from http://packages.python.org/kitchen/api-text-converters.html#transformation-to-xml

So.  Are these unittest files being used or can they simply be discarded?  If they are used, can we port them away from PyXML so that we can get rid of that dependency?

.. [1]: https://fedoraproject.org/wiki/User:Toshio/Remove_PyXML

Comment 1 Miroslav Suchý 2012-07-31 07:26:30 UTC
Cloned to upstream as bug 844603.

Comment 2 Toshio Ernie Kuratomi 2013-01-11 19:49:26 UTC
Glad to see the fix has gone in upstream.  I've created a Fedora 19 Feature for removing PyXML from Fedora.  What are your plans for getting the changes into our package?  Are you going to put the new version in Fedora 19?  Or do you need me to look at backporting the change to the F19 package?

Comment 3 Miroslav Suchý 2013-01-14 09:02:52 UTC
Next version of Spacewalk should be released in 3 weeks.
https://fedorahosted.org/spacewalk/milestone/1.9
I will then build new packages into F19.

Comment 4 Fedora End Of Life 2013-04-03 20:20:26 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 5 Fedora End Of Life 2015-01-09 22:26:05 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Miroslav Suchý 2015-01-14 13:48:15 UTC
this should be fixed now


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