Re: "long int..." exception reported with strange traceback location
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: "long int..." exception reported with strange traceback location

From: Terry Reedy <tjreedy@udel.edu>
Date: Mon Jul 04 2005 - 23:48:15 CEST

"Michael Hoffman" <cam.ac.uk@mh391.invalid> wrote in message
news:dac6v4$5m1$1@gemini.csx.cam.ac.uk...
> I came up with a simpler testcase. Strangely, the exception occurs in
> the statement *following* the os.utime() call:
>
> >>> import os, sys
> >>> os.utime("foo_test_file", (0, float(sys.maxint+1)))
> >>> print "hi"
> OverflowError: long int too large to convert to int
>
> Looks like a bug. You should report it on the SourceForge tracker.

Please include this simpler test, which make clear that bug not just in
deprecated (I believe) rfc module. Also note:

Python 2.2.1 (#34, Apr 9 2002, 19:34:33) [MSC 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os, sys
>>> os.utime("foo_test_file", (0, float(sys.maxint+1)))
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: utime() arg 2 must be a tuple (atime, mtime)

which is quite sane. So maybe bug was introduced in 2.3 which you were
running.
Received on Thu Sep 29 16:45:24 2005