[Python-modules-commits] r2983 - in /packages/turbogears/trunk/debian: changelog patches/05_xml_etree.diff

kitterma-guest at users.alioth.debian.org kitterma-guest at users.alioth.debian.org
Mon Aug 6 03:23:05 UTC 2007


Author: kitterma-guest
Date: Mon Aug  6 03:23:04 2007
New Revision: 2983

URL: http://svn.debian.org/wsvn/python-modules/?sc=1&rev=2983
Log:
Add patch to use xml.etree from python2.5 if available.

Added:
    packages/turbogears/trunk/debian/patches/05_xml_etree.diff
Modified:
    packages/turbogears/trunk/debian/changelog

Modified: packages/turbogears/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/python-modules/packages/turbogears/trunk/debian/changelog?rev=2983&op=diff
==============================================================================
--- packages/turbogears/trunk/debian/changelog (original)
+++ packages/turbogears/trunk/debian/changelog Mon Aug  6 03:23:04 2007
@@ -1,3 +1,11 @@
+turbogears (1.0.2.2-2) UNRELEASED; urgency=low
+
+  * debian/patches/05_xml_etree.diff: Try importing xml.etree from python2.5
+    and fall-back to elementtree if not available
+    (http://trac.turbogears.org/changeset/3262)
+
+ -- Scott Kitterman <scott at kitterman.com>  Sun, 05 Aug 2007 23:17:29 -0400
+
 turbogears (1.0.2.2-1) unstable; urgency=low
 
   * New upstream release

Added: packages/turbogears/trunk/debian/patches/05_xml_etree.diff
URL: http://svn.debian.org/wsvn/python-modules/packages/turbogears/trunk/debian/patches/05_xml_etree.diff?rev=2983&op=file
==============================================================================
--- packages/turbogears/trunk/debian/patches/05_xml_etree.diff (added)
+++ packages/turbogears/trunk/debian/patches/05_xml_etree.diff Mon Aug  6 03:23:04 2007
@@ -1,0 +1,37 @@
+Index: turbogears/command/i18n.py
+===================================================================
+--- turbogears/command/i18n.py	(revision 3250)
++++ turbogears/command/i18n.py	(working copy)
+@@ -10,7 +10,12 @@
+ import optparse
+ import tempfile
+ 
+-from elementtree.ElementTree import ElementTree
++try:
++    # try the python 2.5 way
++    from xml.etree.cElementTree import ElementTree, XML
++except ImportError:
++    # then try the python 2.4 way
++    from elementtree.ElementTree import ElementTree
+ 
+ import formencode
+ import turbogears
+Index: turbogears/toolbox/admi18n/pygettext.py
+===================================================================
+--- turbogears/toolbox/admi18n/pygettext.py	(revision 3250)
++++ turbogears/toolbox/admi18n/pygettext.py	(working copy)
+@@ -169,7 +169,13 @@
+ import operator
+ import codecs
+ 
+-from elementtree.ElementTree import ElementTree, XML
++try:
++    # try the python 2.5 way
++    from xml.etree.cElementTree import ElementTree, XML
++except ImportError:
++    # then try the python 2.4 way
++    from elementtree.ElementTree import ElementTree, XML
++
+ from turbogears.util import fixentities
+ 
+ __version__ = '1.5'




More information about the Python-modules-commits mailing list