[issue5198] Strange DeprecationWarning behaviour in module struct

2010-04-06 Thread Mark Dickinson
Mark Dickinson 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

[issue5198] Strange DeprecationWarning behaviour in module struct

2010-04-05 Thread Georg Brandl
Georg Brandl added the comment: Both examples now give consistent behavior independent of byteorder in trunk: packing floats with "H" works, packing bytes out of range with "B" raises. Closing as "out of date". -- nosy: +georg.brandl resolution: -> out of date status: open -> closed

[issue5198] Strange DeprecationWarning behaviour in module struct

2009-03-05 Thread Ilya Sandler
Ilya Sandler added the comment: It appears that the different behavior results from trying to preserve backward compatibility with earlier version of Python see: http://bugs.python.org/issue1229380 ___ Python tracker _

[issue5198] Strange DeprecationWarning behaviour in module struct

2009-03-04 Thread Ilya Sandler
Ilya Sandler added the comment: Here is another case, which I think is even worse. Range checks are done inconsistently as well: .../trunk> ./python -c 'import struct; struct.pack("B", 257) 'Traceback (most recent call last): File "", line 1, in struct.error: ubyte format requires 0 <= num

[issue5198] Strange DeprecationWarning behaviour in module struct

2009-02-09 Thread Hagen Fürstenau
New submission from Hagen Fürstenau : struct.pack seems to raise a DeprecationWarning for some structure formats, but not for others: Python 2.6.1 (r261:67515, Dec 5 2008, 07:40:41) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import struct >