Description of problem: I'm trying to build a RPM for repoze.profile wich depends on python-meld3. I got the following stack trace: ====================================================================== ERROR: test_keep_at_shutdown (repoze.profile.tests.TestProfileMiddleware) ---------------------------------------------------------------------- Traceback (most recent call last): File "/dev/shm/repoze.profile-1.1/repoze/profile/tests.py", line 318, in test_keep_at_shutdown log_filename=log_filename) File "/dev/shm/repoze.profile-1.1/repoze/profile/tests.py", line 5, in _makeOne from repoze.profile.profiler import AccumulatingProfileMiddleware File "/dev/shm/repoze.profile-1.1/repoze/profile/profiler.py", line 26, in <module> import meld3 File "/usr/lib64/python2.7/site-packages/meld3/__init__.py", line 2, in <module> from meld3 import parse_xml File "/usr/lib64/python2.7/site-packages/meld3/meld3.py", line 27, in <module> from xml.etree.ElementTree import fixtag ImportError: cannot import name fixtag Version-Release number of selected component (if applicable): python-meld3-0.6.5-2.fc14.x86_64
Apparently, there is already a fix upstream for that one: $ svn log -r 981 http://svn.supervisord.org/meld3 ------------------------------------------------------------------------ r981 | Chris McDonough <chrism> | 2010-08-05 03:03:36 +0200 (jeu. 05 août 2010) | 6 lignes 0.6.7 (2010-08-04) Make compatible with Python 2.7 (patch kindly contributed by Jonathan Riboux). ------------------------------------------------------------------------ $ svn diff http://svn.supervisord.org/meld3 -rr980:981 Index: trunk/meld3/test_meld3.py =================================================================== --- trunk/meld3/test_meld3.py (révision 980) +++ trunk/meld3/test_meld3.py (révision 981) @@ -1,6 +1,7 @@ import unittest from StringIO import StringIO import re +import sys _SIMPLE_XML = r"""<?xml version="1.0"?> <root xmlns:meld="http://www.plope.com/software/meld3"> @@ -1671,9 +1672,13 @@ </html>""" def test_unknown_entity(self): - from xml.parsers import expat - self.assertRaises(expat.error, self._parse, - '<html><head></head><body>&fleeb;</body></html>') + if sys.version_info[:3] >= (2,7,0): + self.assertRaises(SyntaxError, self._parse, + '<html><head></head><body>&fleeb;</body></html>') + else: + from xml.parsers import expat + self.assertRaises(expat.error, self._parse, + '<html><head></head><body>&fleeb;</body></html>') def test_content_nostructure(self): root = self._parse(_SIMPLE_XML) Index: trunk/meld3/meld3.py =================================================================== --- trunk/meld3/meld3.py (révision 980) +++ trunk/meld3/meld3.py (révision 981) @@ -3,6 +3,7 @@ import re import types import mimetools +import string from StringIO import StringIO try: @@ -24,10 +25,34 @@ from xml.etree.ElementTree import QName from xml.etree.ElementTree import _raise_serialization_error from xml.etree.ElementTree import _namespace_map - from xml.etree.ElementTree import fixtag from xml.etree.ElementTree import parse as et_parse from xml.etree.ElementTree import ElementPath + try: + from xml.etree.ElementTree import fixtag + except: + def fixtag(tag, namespaces): + # given a decorated tag (of the form {uri}tag), return prefixed + # tag and namespace declaration, if any + if isinstance(tag, QName): + tag = tag.text + namespace_uri, tag = string.split(tag[1:], "}", 1) + prefix = namespaces.get(namespace_uri) + if prefix is None: + prefix = _namespace_map.get(namespace_uri) + if prefix is None: + prefix = "ns%d" % len(namespaces) + namespaces[namespace_uri] = prefix + if prefix == "xml": + xmlns = None + else: + xmlns = ("xmlns:%s" % prefix, namespace_uri) + else: + xmlns = None + return "%s:%s" % (prefix, tag), xmlns + + + # HTMLTreeBuilder does not exist in python 2.5 standard elementtree from HTMLParser import HTMLParser AUTOCLOSE = "p", "li", "tr", "th", "td", "head", "body" Index: trunk/CHANGES.txt =================================================================== --- trunk/CHANGES.txt (révision 980) +++ trunk/CHANGES.txt (révision 981) @@ -1,3 +1,8 @@ +0.6.7 (2010-08-04) + + Make compatible with Python 2.7 (patch kindly contributed by + Jonathan Riboux). + 0.6.6 Change download location. This really should be a setuptools Index: trunk/setup.py =================================================================== --- trunk/setup.py (révision 980) +++ trunk/setup.py (révision 981) @@ -12,12 +12,12 @@ setup( name = 'meld3', - version = '0.6.6', + version = '0.6.7', description = 'meld3 is an HTML/XML templating engine.', author = 'Chris McDonough', author_email = 'chrism', - license='see LICENSE.txt', + license='ZPL 2.1', packages=['meld3'], - url='http://dist.repoze.org/meld3/', + url='http://svn.supervisord.org/meld3/ ', ext_modules=ext_modules, )
This is a one STOP bug for the supervisord package. Supervisord rely on python-meld and after upgrade F13 --> F14 I can't start the supervisord daemon anymore. Now being svd the daemon which starts and control almost all the other machine services you understand that after the upgrade I'm stuck. Would the assignee apply the patch and push the package to upgrade as soon as possible please ? thanks
I've just built python-meld3-0.6.7 which should have the attached fix. Also a note: mmcgrath and I packaged this because we used supervisor it in Fedora Infrastructure. We're now only using one app via supervisor (and contemplating porting that to use a different method). If you (or anyone) would like to become owner or comaintainer for this package and/or the supervisor package, it would be greatly appreciated.
python-meld3-0.6.7-1.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/python-meld3-0.6.7-1.fc14
python-meld3-0.6.7-1.fc14 has been pushed to the Fedora 14 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update python-meld3'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/python-meld3-0.6.7-1.fc14
python-meld3-0.6.7-1.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.