While using pyXLwriter I found the following DeprecatedWarnings:
C:\Python25\Lib\site-packages\pyXLWriter\OLEWriter.py:135: DeprecationWarning: struct integer overflow masking is deprecated
unknown3 = pack("<H", -2)
C:\Python25\Lib\site-packages\pyXLWriter\OLEWriter.py:135: DeprecationWarning: 'H' format requires 0 <= number <= 65535
unknown3 = pack("<H", -2)
C:\Python25\Lib\site-packages\pyXLWriter\OLEWriter.py:141: DeprecationWarning: struct integer overflow masking is deprecated
sbd_startblock = pack("<L", -2)
C:\Python25\Lib\site-packages\pyXLWriter\OLEWriter.py:142: DeprecationWarning: struct integer overflow masking is deprecated
unknown7 = pack("<LLL", 0x00, -2 ,0x00)
C:\Python25\Lib\site-packages\pyXLWriter\OLEWriter.py:143: DeprecationWarning: struct integer overflow masking is deprecated
unused = pack("<L", -1)
C:\Python25\Lib\site-packages\pyXLWriter\OLEWriter.py:205: DeprecationWarning: struct integer overflow masking is deprecated
pps_prev = pack("<L", -1) #0x44
C:\Python25\Lib\site-packages\pyXLWriter\OLEWriter.py:206: DeprecationWarning: struct integer overflow masking is deprecated
pps_next = pack("<L", -1) #0x48
C:\Python25\Lib\site-packages\pyXLWriter\OLEWriter.py:213: DeprecationWarning: struct integer overflow masking is deprecated
pps_sb = pack("<L", sb) #0x74
C:\Python25\Lib\site-packages\pyXLWriter\OLEWriter.py:207: DeprecationWarning: struct integer overflow masking is deprecated
pps_dir = pack("<L", dir) #0x4c
C:\Python25\Lib\site-packages\pyXLWriter\OLEWriter.py:168: DeprecationWarning: struct integer overflow masking is deprecated
marker = pack("<L", -3)
C:\Python25\Lib\site-packages\pyXLWriter\OLEWriter.py:169: DeprecationWarning: struct integer overflow masking is deprecated
end_of_chain = pack("<L", -2)
C:\Python25\Lib\site-packages\pyXLWriter\OLEWriter.py:170: DeprecationWarning: struct integer overflow masking is deprecated
unused = pack("<L", -1)
(Hopefully this is readable, but i also included them in a seperate file)
These warnings occur because it is trying to format a negative value into an unsigned value. So the solution is to change the capital ('L' or 'H') to lowercase ('l' or 'h') because the lowercase means signed format.
I changed these values on my local copy and they seem to work so I thought I post them here as well. Do not know for sure if this is the right place...
bug report
no, that's not an option. Signed and unsigned integers are represented differently. I know this library is dead, but I corrected it, and submited a patch:
https://sourceforge.net/tracker/?func=detail&aid=3433467&group_id=99682&atid=625003