[BUG] 0.15rc2: DeprecationWarning: struct integer overflow masking is deprecated

Jari Aalto+usenet jari.aalto at cante.net
Tue Mar 27 20:50:49 BST 2007


* Mon 2007-03-26 John Arbash Meinel <john AT arbash-meinel.com>
>> /usr/lib/python2.5/site-packages/bzrlib python -Werror /usr/bin/bzr status dirstate.py
>> struct integer overflow masking is deprecated
>> size : <type 'long'> 107912
>> mtime: <type 'float'> 1174919444.0
>> ctime: <type 'float'> 1174919444.0
>> dev  : <type 'long'> 1085651769
>> ino  : <type 'long'> 4336604776193321356
>> mode : <type 'int'> 33188
>> modified:
>>   dirstate.py
>
> Well, it is pretty clear that you have 64-bit inodes, and those aren't
> going to fit in a 32-bit struct.pack.

That's interesting. I'm running w2kSp4, latest Cygwin.

> Now, there are 2 things we could do:
>
> 1) int(st.st_ino & 0xFFFFFFFF)
> This would ignore the warning, at the potential of having a erroneous
> cache hit. (If a files inode changed in the upper 32-bits, but the
> mtime, ctime, size, etc did not)
> The chance of that is pretty darn small, so I think it would be plenty
> safe do do in the short term.

For the 0.15 release this would be welcomed, because I plan to package
that for official Cygwin. If you cant be cautious, you could always
test OS (envvar CYGWIN exists) and apply it for Cygwin only.

> 2) Longer term, I think we are going for "%lX.%lX...." as the
> formatting, rather than base64.encode(struct.pack('>l...')). It seems to
> be a bit faster to generate, can handle 64 bit entries, and scales down
> to small entries, too. I think that is the proposed change for 0.16.

Sounds good.

Jari




More information about the bazaar mailing list