PROTON-2319 Remove Python 2.3 and Jython 2.5 compatibility code (#288)
diff --git a/python/tests/proton_tests/engine.py b/python/tests/proton_tests/engine.py
index 2cf41c6..586f974 100644
--- a/python/tests/proton_tests/engine.py
+++ b/python/tests/proton_tests/engine.py
@@ -39,18 +39,6 @@
# + resuming
# - locally and remotely created deliveries with the same tag
-# Jython 2.5 needs this:
-try:
- bytes()
-except:
- bytes = str
-
-# and this...
-try:
- bytearray()
-except:
- def bytearray(x):
- return b'\x00' * x
OUTPUT_SIZE = 10 * 1024
diff --git a/tools/python/mllib/__init__.py b/tools/python/mllib/__init__.py
index c60657d..e520d61 100644
--- a/tools/python/mllib/__init__.py
+++ b/tools/python/mllib/__init__.py
@@ -71,17 +71,12 @@
def xml_parse(filename, path=()):
- if sys.version_info[0:2] == (2, 3):
- # XXX: this is for older versions of python
- source = "file://%s" % os.path.abspath(filename)
- else:
- source = filename
h = parsers.XMLParser()
p = xml.sax.make_parser()
p.setContentHandler(h)
p.setErrorHandler(ErrorHandler())
p.setEntityResolver(Resolver(path))
- p.parse(source)
+ p.parse(filename)
return h.parser.tree