aboutsummaryrefslogtreecommitdiffstats
path: root/.be/bugs
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2008-11-13 12:31:40 -0500
committerW. Trevor King <wking@drexel.edu>2008-11-13 12:31:40 -0500
commit4671bb85ad36b1ac70d0316ee4d92229d459b90d (patch)
tree212ac0f61c99e1290a131ca0655a31b5dbfb0eb6 /.be/bugs
parentd57ab5228547c416e0c4b5c2d60fef23681e5393 (diff)
downloadbugseverywhere-4671bb85ad36b1ac70d0316ee4d92229d459b90d.tar.gz
Updated imports to handle Python 2.5 ElementTree module.
Opened, fixed, and closed as bug 31c.
Diffstat (limited to '.be/bugs')
-rw-r--r--.be/bugs/31cd490d-a1c2-4ab3-8284-d80395e34dd2/comments/b2a333f7-eda6-42b9-8940-177f61ca7f48/body51
-rw-r--r--.be/bugs/31cd490d-a1c2-4ab3-8284-d80395e34dd2/comments/b2a333f7-eda6-42b9-8940-177f61ca7f48/values21
-rw-r--r--.be/bugs/31cd490d-a1c2-4ab3-8284-d80395e34dd2/values35
3 files changed, 107 insertions, 0 deletions
diff --git a/.be/bugs/31cd490d-a1c2-4ab3-8284-d80395e34dd2/comments/b2a333f7-eda6-42b9-8940-177f61ca7f48/body b/.be/bugs/31cd490d-a1c2-4ab3-8284-d80395e34dd2/comments/b2a333f7-eda6-42b9-8940-177f61ca7f48/body
new file mode 100644
index 0000000..396c06a
--- /dev/null
+++ b/.be/bugs/31cd490d-a1c2-4ab3-8284-d80395e34dd2/comments/b2a333f7-eda6-42b9-8940-177f61ca7f48/body
@@ -0,0 +1,51 @@
+$ python test.py
+**********************************************************************
+File "/home/wking/src/fun/be/libbe/plugin.py", line 31, in libbe.plugin.iter_plugins
+Failed example:
+ "plugin" in [n for n,m in iter_plugins("libbe")]
+Exception raised:
+ Traceback (most recent call last):
+ File "/usr/lib/python2.5/doctest.py", line 1228, in __run
+ compileflags, 1) in test.globs
+ File "<doctest libbe.plugin.iter_plugins[1]>", line 1, in <module>
+ "plugin" in [n for n,m in iter_plugins("libbe")]
+ File "/home/wking/src/fun/be/libbe/plugin.py", line 38, in iter_plugins
+ yield modfile[:-3], my_import(prefix+"."+modfile[:-3])
+ File "/home/wking/src/fun/be/libbe/plugin.py", line 21, in my_import
+ module = __import__(mod_name)
+ File "/home/wking/src/fun/be/libbe/restconvert.py", line 27, in <module>
+ from elementtree import ElementTree
+ ImportError: No module named elementtree
+**********************************************************************
+1 items had failures:
+ 1 of 2 in libbe.plugin.iter_plugins
+***Test Failed*** 1 failures.
+Traceback (most recent call last):
+ File "test.py", line 32, in <module>
+ for module in plugin.iter_plugins("libbe"):
+ File "/home/wking/src/fun/be/libbe/plugin.py", line 38, in iter_plugins
+ yield modfile[:-3], my_import(prefix+"."+modfile[:-3])
+ File "/home/wking/src/fun/be/libbe/plugin.py", line 21, in my_import
+ module = __import__(mod_name)
+ File "/home/wking/src/fun/be/libbe/restconvert.py", line 27, in <module>
+ from elementtree import ElementTree
+ImportError: No module named elementtree
+
+
+Looking into ElementTree, I found their webpage:
+http://effbot.org/zone/element-index.htm
+
+ It’s common practice to import ElementTree under an alias, both to
+ minimize typing, and to make it easier to switch between different
+ implementations:
+
+ $ python
+ >>> import elementtree.ElementTree as ET
+ >>> import cElementTree as ET
+ >>> import lxml.etree as ET
+ >>> import xml.etree.ElementTree as ET # Python 2.5
+
+Using new import style, fall back to old if that fails.
+Affected files:
+ libbe/restconvert.py
+ Bugs-Everywhere-Web/beweb/formatting.py
diff --git a/.be/bugs/31cd490d-a1c2-4ab3-8284-d80395e34dd2/comments/b2a333f7-eda6-42b9-8940-177f61ca7f48/values b/.be/bugs/31cd490d-a1c2-4ab3-8284-d80395e34dd2/comments/b2a333f7-eda6-42b9-8940-177f61ca7f48/values
new file mode 100644
index 0000000..c499bfe
--- /dev/null
+++ b/.be/bugs/31cd490d-a1c2-4ab3-8284-d80395e34dd2/comments/b2a333f7-eda6-42b9-8940-177f61ca7f48/values
@@ -0,0 +1,21 @@
+
+
+
+Content-type=text/plain
+
+
+
+
+
+
+Date=Thu, 13 Nov 2008 17:27:17 +0000
+
+
+
+
+
+
+From=wking
+
+
+
diff --git a/.be/bugs/31cd490d-a1c2-4ab3-8284-d80395e34dd2/values b/.be/bugs/31cd490d-a1c2-4ab3-8284-d80395e34dd2/values
new file mode 100644
index 0000000..b528771
--- /dev/null
+++ b/.be/bugs/31cd490d-a1c2-4ab3-8284-d80395e34dd2/values
@@ -0,0 +1,35 @@
+
+
+
+creator=wking
+
+
+
+
+
+
+severity=minor
+
+
+
+
+
+
+status=closed
+
+
+
+
+
+
+summary=elementtree module moved in Python 2.5
+
+
+
+
+
+
+time=Thu, 13 Nov 2008 16:45:24 +0000
+
+
+