From: Yuri T. <qar...@gm...> - 2008-08-07 00:00:56
|
> Concerning ElementTree version, I made some tests, all versions since > 1.1(including) suitable for us. That means that only 1.0 failed. I'll > add version check to importETree function. > Python 2.5 uses ElementTree 1.2.6. I tried running the new version with Python 2.5, 2.4 and 2.3. For 2.5, all the tests pass out of the box, no element tree installation required. For 2.4, I had to install element tree, after which all works fine. So, we just need to make sure to document this. I think we should include specific line-by-line instructions on the wiki, rather than just sending people to element tree website, which I myself found mildly confusing. E.g., for UNIX: wget http://splyer.com/markdown2.0.tar.gz wget http://splyer.com/markdown2.0-alpha.tar.gz tar xvzf markdown2.0-alpha.tar.gz cd markdown2.0-alpha/ wget http://effbot.org/media/downloads/elementtree-1.2.6-20050316.tar.gz tar xvzf elementtree-1.2.6-20050316.tar.gz mv elementtree-1.2.6-20050316/elementtree . python2.4 test-markdown.py Now, for 2.3 I am getting an error, however: Traceback (most recent call last): File "test-markdown.py", line 358, in ? testDirectory("tests/markdown-test", measure_time=True) File "test-markdown.py", line 246, in testDirectory actual_output = md.convert(input) File "/usr/local/tmp/markdown2.0-alpha/markdown.py", line 1929, in convert xml = codecs.decode(etree.tostring(root, encoding="utf8"), "utf8") As I realize, this is a line I added myself. Apparently, the codecs module in 2.3 does not have a "decode" function. I replaced line 1929 with: xml, length = codecs.utf_8_decode(etree.tostring(root, encoding="utf8")) after which it seems to all work with python2.3 as well. I commited the change with http://gitorious.org/projects/python-markdown/repos/mainline/commits/c78a1e7 Also, another commit to correct placeholder codes to correct STX/ETX codes, and referring to them accordingly. (Now using ASCII 02 and 03, rather than 01 and 02.) http://gitorious.org/projects/python-markdown/repos/mainline/commits/a2e4db6 - yuri -- http://sputnik.freewisdom.org/ |