[Python-Dev] test_struct failure on 64 bit platforms

Neal Norwitz nnorwitz at gmail.com
Wed May 31 09:49:48 CEST 2006


Bob,

There are a couple of things I don't understand about the new struct.
Below is a test that fails.

$ ./python ./Lib/test/regrtest.py test_tarfile test_struct
test_tarfile
/home/pybot/test-trunk/build/Lib/struct.py:63: DeprecationWarning: 'l'
format requires -2147483648 <= number <= 2147483647
  return o.pack(*args)
test_struct
test test_struct failed -- pack('>l', -2147483649) did not raise error
1 test OK.
1 test failed:
    test_struct

####

I fixed the error message (the min value was off by one before).  I
think I fixed a few ssize_t issues too.

The remaining issues I know of are:
  * The warning only appears on 64-bit platforms.
  * The warning doesn't seem correct for 64-bit platforms (l is 8 bytes, not 4).
  * test_struct only fails if run after test_tarfile.
  * The msg from test_struct doesn't seem correct for 64-bit platforms.

I tracked the problem down to trying to write the gzip tar file.  Can
you fix this?

n


More information about the Python-Dev mailing list