]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
remove ElementTree import from babel.compat as this introduces a new (unnecessary...
authorFelix Schwarz <felix.schwarz@oss.schwarz.eu>
Tue, 24 Jul 2012 08:20:14 +0000 (08:20 +0000)
committerFelix Schwarz <felix.schwarz@oss.schwarz.eu>
Tue, 24 Jul 2012 08:20:14 +0000 (08:20 +0000)
babel/compat.py
scripts/import_cldr.py

index c5479d23916016fc0274311cfb91ea79866684f8..8aab36fe497ad0ea5b6004b53313a1784320cfa4 100644 (file)
 # individuals. For the exact contribution history, see the revision
 # history and logs, available at http://babel.edgewall.org/log/.
 
-try:
-    from xml.etree import ElementTree
-except ImportError:
-    from elementtree import ElementTree
-
 try:
     any = any
 except NameError:
index 65654ceb9edf58bacc001a4a653be00f9d0b7bd8..ca91be58d835920c8a1cec4ae4a2f201fe6ea477 100755 (executable)
@@ -17,12 +17,18 @@ from optparse import OptionParser
 import os
 import re
 import sys
+# don't put the ElementTree import in babel/compat.py as this will add a new
+# dependency (elementtree) for Python 2.4 users.
+try:
+    from xml.etree import ElementTree
+except ImportError:
+    from elementtree import ElementTree
 
 # Make sure we're using Babel source, and not some previously installed version
 sys.path.insert(0, os.path.join(os.path.dirname(sys.argv[0]), '..'))
 
 from babel import dates, numbers
-from babel.compat import any, ElementTree
+from babel.compat import any
 from babel.plural import PluralRule
 from babel.localedata import Alias