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 amaury.forgeotdarc
Recipients amaury.forgeotdarc, loewis, mbonnet, pitrou
Date 2008-02-18.16:05:08
SpamBayes Score 0.012621463
Marked as misclassified No
Message-id <1203350709.79.0.18859370166.issue1739842@psf.upfronthosting.co.za>
In-reply-to
Content
Trying to understand the real problem:
Exceptions are not correctly marshalled by xmlrpclib, even with 2.6.

Take a standard exception, and process it:
    e = KeyError("message")
    ((d,), _) = xmlrpclib.loads(xmlrpclib.dumps((e,)))
With python2.4: you get
    {'args': ['message']}
With python2.6: you get
    {}
because 'args' is no more in the Exception's __dict__ anymore (another
regression??)

So to be compatible with 2.4, the correction would be to marshal
BaseException (and subclasses) by dumping its __dict__ augmented with
the "args" member:
    d = value.__dict__.copy()
    d['args'] = value.args
    self.dump_struct(d, write)
Since this code would only concern exception objects which always raise
an error in 2.5, it would not break existing code.
History
Date User Action Args
2008-02-18 16:05:09amaury.forgeotdarcsetspambayes_score: 0.0126215 -> 0.012621463
recipients: + amaury.forgeotdarc, loewis, pitrou, mbonnet
2008-02-18 16:05:09amaury.forgeotdarcsetspambayes_score: 0.0126215 -> 0.0126215
messageid: <1203350709.79.0.18859370166.issue1739842@psf.upfronthosting.co.za>
2008-02-18 16:05:08amaury.forgeotdarclinkissue1739842 messages
2008-02-18 16:05:08amaury.forgeotdarccreate