Remove nowadays unnecassary ElementTree import attempts.
Also update comment about IronPython compatibility.
@@ -28,27 +28,18 @@ NO_ETREE_ERROR = 'No valid ElementTree XML parser module found'
if not IRONPYTHON_WITH_BROKEN_ETREE:
try:
from xml.etree import cElementTree as ET
- except ImportError:
- try:
- import cElementTree as ET
except ImportError:
try:
from xml.etree import ElementTree as ET
- except ImportError:
- try:
- from elementtree import ElementTree as ET
except ImportError:
raise ImportError(NO_ETREE_ERROR)
else:
- # Cannot use standard ET available on IronPython because it is broken
- # both in 2.7.0 and 2.7.1:
- # http://ironpython.codeplex.com/workitem/31923
- # http://ironpython.codeplex.com/workitem/21407
+ # Standard ElementTree works only with IronPython 2.7.9+
+ # https://github.com/IronLanguages/ironpython2/issues/370
try:
from elementtree import ElementTree as ET
except ImportError:
raise ImportError(NO_ETREE_ERROR)
-
from StringIO import StringIO
