[issue5198] Strange DeprecationWarning behaviour in module struct

Mark Dickinson report at bugs.python.org
Tue Apr 6 17:23:17 CEST 2010


Mark Dickinson <dickinsm at gmail.com> added the comment:

The wrong location for the DeprecationWarnings was also fixed in trunk in r78690.  I've backported the fix to release26-maint in r79834.

I don't dare mess further with the warnings in a bugfix release;  as Georg points out, the issues are fixed in trunk.  BTW, one of the 2.6 issues (again fixed in trunk) that wasn't mentioned above is that some packs produce *two* overflow-related warnings:

>>> import struct
>>> struct.pack('<L', -1)
__main__:1: DeprecationWarning: struct integer overflow masking is deprecated
__main__:1: DeprecationWarning: 'L' format requires 0 <= number <= 4294967295
'\xff\xff\xff\xff'

----------
nosy: +mark.dickinson

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5198>
_______________________________________


More information about the Python-bugs-list mailing list