Upgrading standard library module

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Tue Feb 17 03:34:46 EST 2009

En Fri, 13 Feb 2009 20:17:35 -0200, Bryan <bryanvick at gmail.com> escribió:
> On Feb 13, 1:52 pm, Jason Scheirer <jason.schei... at gmail.com> wrote:
>> On Feb 13, 12:42 pm, Bryan <bryanv... at gmail.com> wrote:
>> > I have a Python v2.5.2 server running and I found some undesirable
>> > behavior in the xmlrpclib module that is included with that version of
>> > Python.  The xmlrpclib version that is included with Python 2.6
>> > changes the behavior for the better.  I nervous about upgrading my
>> > Python install to 2.6 on this server because I remember reading in the
>> > docs of a library I use that it targets the 2.5 branch.  What is the
>> > best way to only upgrade the xmlrpclib in my 2.5 install?
>> What behavior, exactly, do you not like in xmlrpclib? Diffing the 2.5
>> and 2.6, only significant differences I see are checks for True/False
>> as builtins left over from pre-2.4 and some datetime handling.
> The xmlrpclib in my 2.5.2 install does not allow the marshaling of my
> custom objects.  It checks the type of my object, and if it isn't in a
> hard-coded list of types, then a "Cannot marshal object of <type>
> type" exception message shows up.  The version in my Windows 2.6
> install has a fall back case where if the type is not in the hard-
> coded list, it simply calls Object.__dict__ to get a graph of the
> object's values that can be marshaled into xmlrpc.
> I am using xmlrpc through Pylons.  As a workaround, instead of
> returning my custom objects in my xmlrpc server functions, I return
> MyObject.__dict__
> I also did not see anything in the revision log in the source file
> about this change.

It was rev.52790: http://svn.python.org/view?rev=52790&view=rev
The tracker item has some background: http://bugs.python.org/issue1070046

Gabriel Genellina

More information about the Python-list mailing list