From: Mark Dickinson Date: Sun, 19 Apr 2009 17:10:47 +0000 (+0000) Subject: Automatic conversion of floats to integers for struct.pack integer codes X-Git-Tag: v2.7a1~1449 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9be2697fb65ef7bd5cd8da8961260492438e26d2;p=thirdparty%2FPython%2Fcpython.git Automatic conversion of floats to integers for struct.pack integer codes is deprecated. Use an explicit int() instead. --- diff --git a/Lib/compileall.py b/Lib/compileall.py index f99b8340cff4..49537fded0b9 100644 --- a/Lib/compileall.py +++ b/Lib/compileall.py @@ -57,7 +57,7 @@ def compile_dir(dir, maxlevels=10, ddir=None, if tail == '.py': if not force: try: - mtime = os.stat(fullname).st_mtime + mtime = int(os.stat(fullname).st_mtime) expect = struct.pack('<4sl', imp.get_magic(), mtime) cfile = fullname + (__debug__ and 'c' or 'o') with open(cfile, 'rb') as chandle: