This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dep
Recipients dep
Date 2010-08-26.22:05:00
SpamBayes Score 1.2017885e-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