[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#572998: python-apt: Inconsitent return values in apt.package.Package.get_changelog



Am Montag, den 08.03.2010, 07:20 +0100 schrieb Sebastian Heinlein:
> Package: python-apt
> Version: 0.7.93.3
> Severity: normal
> 
> The method get_changelog of apt.package.Package will return an unicode
> instance if the changelog could be downloaded. If the download fails it
> will return an error string.

It returns the return value of apt_pkg.gettext() which is an object of
the default string type (on Python 3, this is an unicode string on
Python 2, it is a bytes string); previously it used gettext.gettext()
which did the same thing.

I could change the code to decode the bytes string it received from
apt_pkg.gettext() to an unicode one; but I have to be careful not to
break the Python 3 build; where apt_pkg.gettext() is already an unicode
string.


> 
> 
> -- System Information:
> Debian Release: squeeze/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable'), (1, 'experimental')
> Architecture: i386 (i686)
> 
> Kernel: Linux 2.6.32-trunk-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. 0.7.25.3    Advanced front-end for dpkg
> ii  apt-utils [libapt-inst-libc6 0.7.25.3    APT utility programs
> ii  libc6                        2.10.2-6    Embedded GNU C Library: Shared lib
> ii  libgcc1                      1:4.4.3-3   GCC support library
> ii  libstdc++6                   4.4.3-3     The GNU Standard C++ Library v3
> ii  python                       2.5.4-9     An interactive high-level object-o
> ii  python-central               0.6.14+nmu2 register and build utility for Pyt
> ii  python2.6                    2.6.4-6     An interactive high-level object-o
> 
> Versions of packages python-apt recommends:
> ii  iso-codes                     3.14-1     ISO language, territory, currency,
> ii  libjs-jquery                  1.4.1-1    JavaScript library for dynamic web
> ii  lsb-release                   3.2-23     Linux Standard Base version report
> 
> Versions of packages python-apt suggests:
> ii  python-apt-dbg                0.7.93.3   Python interface to libapt-pkg (de
> ii  python-gtk2                   2.16.0-2   Python bindings for the GTK+ widge
> ii  python-vte                    1:0.22.5-2 Python bindings for the VTE widget
> 
> -- no debconf information
> 
> 
> 

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.





Reply to: