Your message dated Sat, 05 Nov 2011 02:49:05 +0000
with message-id <e1rmwjd-0005z9...@franck.debian.org>
and subject line Bug#644246: fixed in python-meld3 0.6.5-3.1
has caused the Debian Bug report #644246,
regarding python-meld3: broken with Python 2.7
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
644246: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=644246
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: python-meld3
Version: 0.6.5-3
Severity: important
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch oneiric
When built for Python 2.7, python-meld3 is broken:
$ python
Python 2.7.2+ (default, Aug 16 2011, 07:29:45)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import meld3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/pymodules/python2.7/meld3/__init__.py", line 2, in <module>
from meld3 import parse_xml
File "/usr/lib/pymodules/python2.7/meld3/meld3.py", line 27, in <module>
from xml.etree.ElementTree import fixtag
ImportError: cannot import name fixtag
This has been reported in a few other distributions' bug tracking
systems:
https://bugs.launchpad.net/ubuntu/+source/python-meld3/+bug/749880
https://bugzilla.redhat.com/show_bug.cgi?id=652890
... and fixed upstream:
https://github.com/Supervisor/meld3/commit/afe92611ee5959d1105a37c4403c99520e24c4ae
Jessica McKellar extracted the relevant patch and applied it to the
Ubuntu package. Here's a diff.
* Apply most of commit afe92611 upstream to make the package compatible
with Python 2.7. (LP: #749880)
-- Jessica McKellar <jesst...@mit.edu> Sun, 02 Oct 2011 16:08:55 -0400
--- python-meld3-0.6.5.orig/meld3/meld3.py
+++ python-meld3-0.6.5/meld3/meld3.py
@@ -3,6 +3,7 @@
import re
import types
import mimetools
+import string
from StringIO import StringIO
try:
@@ -24,10 +25,32 @@
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"
--- python-meld3-0.6.5.orig/meld3/test_meld3.py
+++ python-meld3-0.6.5/meld3/test_meld3.py
@@ -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)
Thanks,
--
Colin Watson [cjwat...@ubuntu.com]
--- End Message ---
--- Begin Message ---
Source: python-meld3
Source-Version: 0.6.5-3.1
We believe that the bug you reported is fixed in the latest version of
python-meld3, which is due to be installed in the Debian FTP archive:
python-meld3_0.6.5-3.1.debian.tar.gz
to main/p/python-meld3/python-meld3_0.6.5-3.1.debian.tar.gz
python-meld3_0.6.5-3.1.dsc
to main/p/python-meld3/python-meld3_0.6.5-3.1.dsc
python-meld3_0.6.5-3.1_amd64.deb
to main/p/python-meld3/python-meld3_0.6.5-3.1_amd64.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 644...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Arnaud Fontaine <ar...@debian.org> (supplier of updated python-meld3 package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Mon, 31 Oct 2011 10:48:32 +0900
Source: python-meld3
Binary: python-meld3
Architecture: source amd64
Version: 0.6.5-3.1
Distribution: unstable
Urgency: low
Maintainer: Anders Hammarquist <i...@debian.org>
Changed-By: Arnaud Fontaine <ar...@debian.org>
Description:
python-meld3 - An HTML/XML templating system for Python
Closes: 644246
Changes:
python-meld3 (0.6.5-3.1) unstable; urgency=low
.
* Non-maintainer upload.
* Apply Ubuntu patch to make the package compatible with Python
2.7. Thanks to Jessica McKellar. Closes: #644246.
+ Switch to 3.0 (quilt) source format to apply patch cleanly.
Checksums-Sha1:
81dc014ab2c8443c9e3c14bac5c6db3824ce9a19 1200 python-meld3_0.6.5-3.1.dsc
5027bc6ca4ea9b275bd404b330f8c0fdda93dd3f 4460
python-meld3_0.6.5-3.1.debian.tar.gz
8c9d52e9e4f0ca367bbe4bd8f60cca82580ea9eb 47686 python-meld3_0.6.5-3.1_amd64.deb
Checksums-Sha256:
570bf32b0325d21cdca82fee6c767d49f6846f287b373d8af20886c92da02b84 1200
python-meld3_0.6.5-3.1.dsc
288ebea2fb42d25f9f4ed5a8e102395843af8032fd99d86c498660013d0edbb4 4460
python-meld3_0.6.5-3.1.debian.tar.gz
eccff218f2ab26bddb0f3da71058a90bce2e3e4bb15f4c361937f4dc925c2d23 47686
python-meld3_0.6.5-3.1_amd64.deb
Files:
7db7fcbed4ed7ec29e0c3488eb4846da 1200 python extra python-meld3_0.6.5-3.1.dsc
7d3f2ccd012e1870ad89696f02890e78 4460 python extra
python-meld3_0.6.5-3.1.debian.tar.gz
6fa044835ddf8293fdea221290d5adc4 47686 python extra
python-meld3_0.6.5-3.1_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iEYEARECAAYFAk6uApYACgkQvfKiIF42GdNBJACeN2yRhKjr6uQXTcXDDMEZOmft
orsAoI5uAt7FR/dBpqwoA5dpJiKmqoFM
=WmI1
-----END PGP SIGNATURE-----
--- End Message ---