In the line: return struct.pack('>I',self.value)
self.value is a signed (32-bit) integer, but according to http://docs.python.org/lib/module-struct.html, the capital 'I' should be used for unsigned ints. The warning goes away if a lower-case 'i' is used instead: return struct.pack('>i',self.value)