[BUG] 0.15rc2: DeprecationWarning: struct integer overflow masking is deprecated
John Arbash Meinel
john at arbash-meinel.com
Thu Mar 22 14:31:20 GMT 2007
Jari Aalto wrote:
> FYI, Cygwin's 0.15rc2 reports following message:
>
> $ bzr ci -m "..."
> /usr/lib/python2.5/site-packages/bzrlib/dirstate.py:2302: DeprecationWarning: struct integer overflow masking is deprecated
> , st.st_dev, st.st_ino, st.st_mode))[:-1]
>
> $ bzr --version
> Bazaar (bzr) 0.15.0candidate2
> Using python interpreter: /usr/bin/python2.5
> Using python standard library: /usr/lib/python2.5
> Using bzrlib: /usr/lib/python2.5/site-packages/bzrlib
> Using bazaar configuration: /cygdrive/x/home/jaalto/.bazaar
>
> Btw, perhaps there should be 2nd line which read:
>
> OS: <output of 'uname -a' or equivalent>
>
> In Cygwin 'uname -r' is available.
>
> Jari
I think we just need to do:
struct.pack('>LLLLLL') instead of struct.pack('>llllll')
This is technically an change to the working tree format. However, I
think 99% of the time it won't trigger (because I think the packing is
actually the same for signed versus unsigned), but also most of the time
the numbers will be < 2^31.
When it *does* differ, though. All it causes is a stat-cache miss. Which
means we re-read the file, compute the sha1, and record the difference.
(Just as if you did 'touch file', which updates the stat values).
Robert has also been working on an updated packing, which should be both
faster to compute, and more lenient of really large numbers. (Using
'%X', rather than base64 encode of a packed struct.)
Can you try using 'LLLLLL' and see if it avoids the warning for you?
John
=:->
More information about the bazaar
mailing list