'long int too large to convert to int' in 'garbage collection' ignored

Peter Kwan pkwan at advsofteng.com
Fri Aug 1 12:12:09 EDT 2003


Hi Skip,

Although I know it can be suppressed, it could not very desirable for my
case.

First, I think if the code is not fixed, it will break in Python 2.4 anyway.

In Python 2.4, the 0x80996633 will be considered as Long even if I do not
have append an "L". So it will crash with 'long int too large to convert to
int' in 'garbage collection' ignored, unless this is fixed.

I am a developer for Python libraries. I would like to write some code that
works in all common versions of Python and that is easy to use and works in
most environments.

The warning can only be suppressed using command line switches. It makes my
library harder to use if you need to add certain switches in order to use it
in some versions of Python. Also, in some environment, the command line
switch may be hard to add - for example, when using Python in IIS or using
mod_python, etc..

But if there is no better solution, I must live with the warning message for
now, and hoping by Python 2.4, someone would have fixed that bug.

Regards
Peter Kwan

----- Original Message -----
From: "Skip Montanaro" <skip at pobox.com>
To: "Peter Kwan" <pkwan at advsofteng.com>
Cc: <python-list at python.org>
Sent: Friday, August 01, 2003 11:08 PM
Subject: Re: 'long int too large to convert to int' in 'garbage collection'
ignored


>
>     Peter> FutureWarning: hex/oct constants > sys.maxint will return
>     Peter> positive values in Python 2.4 and up
>
> You can suppress this warning.  I don't know the implications downstream
> though.  You should read through the 2.3-related docs.  This page looks
> particularly useful:
>
>     http://www.python.org/doc/2.3/whatsnew/node22.html
>
> Skip
>






More information about the Python-list mailing list