Author dep
Recipients dep
Date 2010-08-26.22:05:00
SpamBayes Score 1.20179e-05
Marked as misclassified No
Message-id <1282860303.06.0.424236317482.issue9696@psf.upfronthosting.co.za>
In-reply-to
Content
The problem is easy to reproduce:

>>> import xdrlib
>>> p = xdrlib.Packer()
>>> p.pack_int(-1)
__main__:1: DeprecationWarning: struct integer overflow masking is deprecated

The cause is xdrlib.Packer uses the same pack operation for both
signed and unsigned integers...

    def pack_uint(self, x):
        self.__buf.write(struct.pack('>L', x))

    pack_int = pack_uint

...and the unsigned struct.pack('>L', x) gags on the negative value.
History
Date User Action Args
2010-08-26 22:05:03depsetrecipients: + dep
2010-08-26 22:05:03depsetmessageid: <1282860303.06.0.424236317482.issue9696@psf.upfronthosting.co.za>
2010-08-26 22:05:01deplinkissue9696 messages
2010-08-26 22:05:00depcreate