On Fri, Sep 24, 2010 at 07:28:08PM +0100, Steven Chamberlain wrote:
> On 24/09/10 18:33, Steven Chamberlain wrote:
> >>python/acquire.cc: In function 'PyObject* PkgAcquireNew(PyTypeObject*,
> >>PyObject*, PyObject*)':
> >>python/acquire.cc:331: warning:
> >>'pkgAcquire::pkgAcquire(pkgAcquireStatus*)' is deprecated (declared at
> >>/usr/include/apt-pkg/acquire.h:352)
[..]
> --- python-apt-0.7.97.1~orig/python/acquire-item.cc   2010-05-19 
> 11:48:44.000000000 +0100
> +++ python-apt-0.7.97.1/python/acquire-item.cc        2010-09-24 
> 19:07:39.000000000 +0100
> @@ -162,7 +162,7 @@
>          return 0;
>      return PyString_FromFormat("<%s object: "
>                                 "Status: %i Complete: %i Local: %i IsTrusted: 
> %i "
> -                               "FileSize: %lu DestFile:'%s' "
> +                               "FileSize: %llu DestFile:'%s' "
>                                 "DescURI: '%s' ID:%lu ErrorText: '%s'>",
>                                 Self->ob_type->tp_name,
>                                 Itm->Status, Itm->Complete, Itm->Local, 
> Itm->IsTrusted(),

One more odd thing I discovered is that %llu apparently is only
available in python 2.7+ (see [1]). When it encounters the first
unknown format string it stops. That is what I see in the debug
output, %llu and no further strings. That is rather unfortunate from
python. 

I guess PyString_FromFormat() in 2.6 can not be used for this and a
normal snprintf() is required on older python versions. 

Cheers,
 Michael


[1] http://docs.python.org/c-api/string.html



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to