Your message dated Sat, 22 Aug 2009 20:30:27 +0200 with message-id <20090822201521.GA18682@debian.org> and subject line Re: Bug#542965: python-apt: Cache does not support unicode as package key has caused the Debian Bug report #542965, regarding python-apt: Cache does not support unicode as package key 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 owner@bugs.debian.org immediately.) -- 542965: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542965 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: python-apt: Cache does not support unicode as package key
- From: Sebastian Heinlein <devel@glatzor.de>
- Date: Thu, 20 Aug 2009 00:59:00 +0200
- Message-id: <[🔎] 20090819225900.11993.82373.reportbug@unstable.virtual>
Package: python-apt Version: 0.7.12.1 Severity: important The error message: >>> import apt >>> apt.Cache()[u"xterm"] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.5/site-packages/apt/cache.py", line 139, in __getitem__ pkg = self._weakref[key] = Package(self, self._cache[key]) TypeError Cheers, Sebastian -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.30-1-686 (SMP w/2 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages python-apt depends on: ii apt [libapt-pkg-libc6.9-6-4.8 0.7.22.2 Advanced front-end for dpkg ii apt-utils [libapt-inst-libc6. 0.7.22.2 APT utility programs ii libc6 2.9-23 GNU C Library: Shared libraries ii libgcc1 1:4.4.1-1 GCC support library ii libstdc++6 4.4.1-1 The GNU Standard C++ Library v3 ii lsb-release 3.2-23 Linux Standard Base version report ii python 2.5.4-2 An interactive high-level object-o ii python-central 0.6.11 register and build utility for Pyt Versions of packages python-apt recommends: ii iso-codes 3.10.2-1 ISO language, territory, currency, ii libjs-jquery 1.3.3-1 JavaScript library for dynamic web Versions of packages python-apt suggests: pn python-apt-dbg <none> (no description available) ii python-gtk2 2.14.1-3 Python bindings for the GTK+ widge ii python-vte 1:0.20.5-1 Python bindings for the VTE widget -- no debconf information
--- End Message ---
--- Begin Message ---
- To: Sebastian Heinlein <devel@glatzor.de>, 542965-done@bugs.debian.org
- Subject: Re: Bug#542965: python-apt: Cache does not support unicode as package key
- From: Julian Andres Klode <jak@debian.org>
- Date: Sat, 22 Aug 2009 20:30:27 +0200
- Message-id: <20090822201521.GA18682@debian.org>
- In-reply-to: <[🔎] 20090819225900.11993.82373.reportbug@unstable.virtual>
- References: <[🔎] 20090819225900.11993.82373.reportbug@unstable.virtual>
Version: 0.7.92 On Thu, Aug 20, 2009 at 12:59:00AM +0200, Sebastian Heinlein wrote: > Package: python-apt > Version: 0.7.12.1 > Severity: important This bug is wishlist, not important. Or do you really think that it "has a major effect on the usability of a package"? > > > The error message: > > >>> import apt > >>> apt.Cache()[u"xterm"] > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/lib/python2.5/site-packages/apt/cache.py", line 139, in __getitem__ > pkg = self._weakref[key] = Package(self, self._cache[key]) > TypeError It works in 0.7.92. There are also some other places where we could accept unicode strings e.g. TagSection.__getitem__(). It's also much better to pass str objects, as unicode handling has memory leaks, because we can not delete the temporary encoded object we create. You can pass str objects easily in Python, e.g. dbus supports passing utf8_strings=True to most methods to get a str-based object (dbus.UTF8String). -- Julian Andres Klode - Debian Developer, Ubuntu Member See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.Attachment: pgpJjUBXU6v1m.pgp
Description: PGP signature
--- End Message ---