[xml/sgml-pkgs] Bug#259526: libxml2-python2.3: Python file drv_libxml2.py should specify encoding

Kai Weber Kai Weber <kai.weber@glorybox.de>, 259526@bugs.debian.org
Thu, 15 Jul 2004 11:23:32 +0200


This is a multi-part MIME message sent by reportbug.

--===============0355277552==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: libxml2-python2.3
Version: 2.6.11-1
Severity: normal
Tags: patch

The drv_libxml2.py should specify a file encoding. Else it sends every
time this deprecation warning:

/usr/lib/python2.3/xml/sax/__init__.py:105: DeprecationWarning: Non-ASCII
character '\xe9' in file /usr/lib/python2.3/site-packages/drv_libxml2.py on
line 36, but no encoding declared; see http://www.python.org/peps/pep-0263.html
for details

Patch attached

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.7
Locale: LANG=C, LC_CTYPE=de_DE.UTF-8

Versions of packages libxml2-python2.3 depends on:
ii  libc6                       2.3.2.ds1-13 GNU C Library: Shared libraries an
ii  libxml2                     2.6.11-1     GNOME XML library
ii  python2.3                   2.3.4-5      An interactive high-level object-o

-- no debconf information

--===============0355277552==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="pep263.patch"

diff -Nrud libxml2-2.6.11.orig/python/drv_libxml2.py libxml2-2.6.11/python/drv_libxml2.py
--- libxml2-2.6.11.orig/python/drv_libxml2.py	2004-07-15 11:16:04.000000000 +0200
+++ libxml2-2.6.11/python/drv_libxml2.py	2004-07-15 11:17:51.000000000 +0200
@@ -1,3 +1,4 @@
+# -*- coding: latin1 -*-
 """ A SAX2 driver for libxml2, on top of it's XmlReader API
 
 USAGE

--===============0355277552==--