Bug 795875 - PyXML overloads python xml
PyXML overloads python xml
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: python (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Bohuslav "Slavek" Kabrda
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-21 12:41 EST by Thomas Woerner
Modified: 2013-05-10 03:19 EDT (History)
8 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Thomas Woerner 2012-02-21 12:41:17 EST
Description of problem:
If PyXML is installed it is used instead of the the xml module in python itself. The implementations are not fully compatible. Affected are for example the sax parsers in firewalld. The in operator is used for attrs in the startElement function. This is not supported in PyXML, but code that is compatible to Python 3 can not use has_key instead of in.

Version-Release number of selected component (if applicable):
PyXML-0:0.8.4-26.fc15.x86_64

How reproducible:
Always

Additional info:
This is also a problem in F-16.
Comment 1 Toshio Ernie Kuratomi 2012-07-24 13:33:11 EDT
Roman asked if we could Remove PyXML from Fedora.  I'm currently working on analyzing what packages are actually using PyXML to see if we can get rid of it:

https://fedoraproject.org/wiki/User:Toshio/Remove_PyXML

The precise change you ask for here cannot be done by the PyXML package -- it's a change that has to come from the python stdlib.  I'm reassigning this to the python package so that everyone involved knows about this bug but -- our first choice option seems to be to get rid of PyXML altogether.  Modifying the python stdlib is the second choice.
Comment 2 Dave Malcolm 2012-07-25 20:13:11 EDT
Possible workaround for code that requires the stdlib's "xml", rather than PyXML's "_xmlplus" implementation:
http://lists.fedoraproject.org/pipermail/python-devel/2012-July/000399.html
Comment 3 Toshio Ernie Kuratomi 2012-07-30 23:37:15 EDT
A better workaround from Nick Coghlan:

http://lists.fedoraproject.org/pipermail/python-devel/2012-July/000403.html

import xml
xml.__path__.reverse() # If both are available, prefer stdlib over PyXML
Comment 4 Fedora Admin XMLRPC Client 2013-05-10 00:58:24 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 5 Fedora Admin XMLRPC Client 2013-05-10 01:00:09 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 6 Fedora Admin XMLRPC Client 2013-05-10 01:04:13 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 7 Fedora Admin XMLRPC Client 2013-05-10 01:12:11 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 8 Fedora Admin XMLRPC Client 2013-05-10 01:12:26 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 9 Toshio Ernie Kuratomi 2013-05-10 03:19:58 EDT
PyXML has been removed in F19.

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