backend/satellite_tools/test/testxmlparser.py | 51 ------------------
backend/satellite_tools/test/testxmlwriter.py | 71 --------------------------
backend/satellite_tools/xmlSource.py | 6 +-
backend/spacewalk-backend.spec | 1
client/tools/osad/osad.spec | 3 -
5 files changed, 3 insertions(+), 129 deletions(-)
New commits:
commit c184f39a3b35a7cb9048be5b68f00de6a3013aad
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Jul 31 16:31:21 2012 +0200
844603 - removed PyXML dependency
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index 148a0ef..d2cef61 100644
--- a/client/tools/osad/osad.spec
+++ b/client/tools/osad/osad.spec
@@ -29,9 +29,6 @@ Requires: python-hashlib
%endif
%if 0%{?suse_version} >= 1140
Requires: python-xml
-%else
-# This should have been required by rhnlib
-Requires: PyXML
%endif
Conflicts: osa-dispatcher < %{version}-%{release}
Conflicts: osa-dispatcher > %{version}-%{release}
commit 49a45aa24bd44fbe6f304642f8cfe69e5d3d9ae2
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Jul 31 16:24:20 2012 +0200
844603 - removed PyXML from comment
diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py
index 75c645c..a585e88 100644
--- a/backend/satellite_tools/xmlSource.py
+++ b/backend/satellite_tools/xmlSource.py
@@ -57,18 +57,18 @@ class IncompatibleVersionError(ParseException):
self.stream_version = stream_version
self.parser_version = parser_version
-# PyXML parser exception wrappers
+# XML parser exception wrappers
# Exposed functionality for the next three include:
# getColumnNumber(), getLineNumber(), and _msg (or just str(e))
class RecoverableParseException(SAXParseException):
- """exception wrapper for a critical, but possibly recoverable, PyXML
parser
+ """exception wrapper for a critical, but possibly recoverable, XML
parser
error.
"""
pass
class FatalParseException(SAXParseException):
- """exception wrapper for a critical PyXML parser error.
+ """exception wrapper for a critical XML parser error.
"""
pass
commit 7071fefc1fa4b9bf7b0dcfc891c952fab5d74b43
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Jul 31 16:21:49 2012 +0200
844603 - removed PyXML dependency
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 2b9235a..d67fc80 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -243,7 +243,6 @@ Requires: spacewalk-certs-tools
Requires: spacewalk-admin >= 0.1.1-0
Requires: python-gzipstream
Requires: python-hashlib
-Requires: PyXML
Requires: mod_ssl
Requires: %{name}-xml-export-libs
Requires: cobbler >= 2.0.0
commit 3e695ebe108b372b3c89ab1db5a6cb224622a84b
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Jul 31 16:19:12 2012 +0200
844603 - removed broken unused unittests
these look to be the only files which require obsoleted PyXML
diff --git a/backend/satellite_tools/test/testxmlparser.py
b/backend/satellite_tools/test/testxmlparser.py
deleted file mode 100644
index 1627734..0000000
--- a/backend/satellite_tools/test/testxmlparser.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# Copyright (c) 2008 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-#
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-import string
-from xml.sax import make_parser, saxutils
-from xml.sax.handler import feature_namespaces
-from xml.unicode.utf8_iso import utf8_to_code
-
-parser = make_parser(feature_namespaces)
-
-chars = []
-
-def utf8_to_string(charlist):
- ret = []
- while charlist:
- c, charlist = utf8_to_code(1, charlist)
- ret.append(c)
- return string.join(ret, "")
-
-class Handler(saxutils.DefaultHandler):
- def startElement(self, element, attrs):
- print "Start: %s" % element
-
- def endElement(self, element):
- print "End: %s" % element
-
- def characters(self, data):
- global chars
- chars.append(data)
-
-f = open("/tmp/document.xml")
-h = Handler()
-parser.setContentHandler(h)
-
-parser.parse(f)
-
-chars = string.join(chars, "")
-chars = utf8_to_string(chars)
-print len(chars)
-print chars
diff --git a/backend/satellite_tools/test/testxmlwriter.py
b/backend/satellite_tools/test/testxmlwriter.py
deleted file mode 100644
index e2920e4..0000000
--- a/backend/satellite_tools/test/testxmlwriter.py
+++ /dev/null
@@ -1,71 +0,0 @@
-#
-# Copyright (c) 2008 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-#
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-import string
-from xml.sax.saxutils import escape
-from xml.unicode.utf8_iso import code_to_utf8
-import xml.sax.writer
-
-def my_escape(data, entities={}):
- print "My own escape function"
- data = escape(data, entities)
- data = string.join(map(lambda x: code_to_utf8(1, x), data), "")
- return data
-
-setattr(xml.sax.writer, 'escape', my_escape)
-
-class XML_writer(xml.sax.writer.XmlWriter):
- def __init__(self, fp, standalone=None, dtdinfo=None, syntax=None,
- linelength=None, encoding='iso-8859-1'):
- xml.sax.writer.XmlWriter.__init__(self, fp, standalone=standalone,
- dtdinfo=dtdinfo, syntax=syntax, linelength=linelength,
- encoding=encoding)
- self._stack = []
-
- def startElement(self, tag, attrs={}):
- xml.sax.writer.XmlWriter.startElement(self, tag, attrs)
- self._stack.append(tag)
-
- def characters(self, data, start=0, length=None):
- if length is None:
- length = len(data)
- # Close the open tag if necessary
- xml.sax.writer.XmlWriter.characters(self, data, start, length)
-
- def endElement(self, tag):
- xml.sax.writer.XmlWriter.endElement(self, tag)
- self._stack.pop()
-
- def endDocument(self):
- while self._stack:
- tag = self._stack[-1]
- self.endElement(tag)
-
-f = open("/tmp/document.xml", "w+")
-w = XML_writer(f, encoding='utf-8')
-
-w.startDocument()
-w.startElement("rhn-satellite", {"version" : 1})
-w.startElement("rhn-channels")
-w.startElement("rhn-channel", {
- 'label' : 'redhat-linux-i386-7.2',
- 'arch' : 'i386',
-})
-s = "0123456789 ©" * 100
-w.characters(s)
-w.endElement("rhn-channel")
-w.endElement("rhn-channels")
-w.endElement("rhn-satellite")
-w.endDocument()
-f.close()