Skip to content

backports.xmlrpc does not handle list in multical #206

Open
@stevezau

Description

@stevezau

When using multicall i'm getting an exception that it cannot marshall the lists.. This is due to https://github.com/PythonCharmers/python-future/blob/master/src/future/backports/xmlrpc/client.py#L529 the type is list which ensure_new_type throws the exception.

I'm happy to fix this and raise a PR but i'm not sure what's the best fix?

    resp = multi_call()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/future/backports/xmlrpc/client.py", line 879, in __call__
    return MultiCallIterator(self.__server.system.multicall(marshalled_list))
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/future/backports/xmlrpc/client.py", line 1107, in __call__
    return self.__send(self.__name, args)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/future/backports/xmlrpc/client.py", line 1430, in __request
    allow_none=self.__allow_none).encode(self.__encoding)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/future/backports/xmlrpc/client.py", line 968, in dumps
    data = m.dumps(params)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/future/backports/xmlrpc/client.py", line 521, in dumps
    dump(v, write)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/future/backports/xmlrpc/client.py", line 533, in __dump
    raise TypeError("cannot marshal %s objects" % type(value))
TypeError: cannot marshal <type 'list'> objects

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions