classification
Title: xmlrpc.client encode error
Type: behavior Stage: resolved
Components: Library (Lib), XML Versions: Python 3.2
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: flox, luchenue, python-dev
Priority: normal Keywords:

Created on 2011-10-30 12:55 by luchenue, last changed 2011-10-30 23:49 by flox. This issue is now closed.

Messages (4)
msg146637 - (view) Author: luchenue (luchenue) Date: 2011-10-30 12:55
import xmlrpc.client

server = xmlrpc.client.Server('XXX')
print(server.login(b'bHVjaGVudWU=',b'bHVjaGVudWU='))

=> xmlrpc.client 
def dump_string
  write(escape(value))

dispatch[bytes] = dump_string

=>
def escape(s):
    s = s.replace("&", "&")



bytes can't replace
msg146638 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2011-10-30 13:52
binary data should be wrapped with Binary.
http://docs.python.org/dev/library/xmlrpc.client.html#binary-objects
msg146656 - (view) Author: Roundup Robot (python-dev) Date: 2011-10-30 19:26
New changeset 013d2881beb5 by Florent Xicluna in branch '3.2':
Issue #13293: Better error message when trying to marshal bytes using xmlrpc.client.
http://hg.python.org/cpython/rev/013d2881beb5
msg146667 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2011-10-30 23:49
FWIW, I opened a feature request #13297.
History
Date User Action Args
2011-10-30 23:49:37floxsetmessages: + msg146667
2011-10-30 19:26:53python-devsetnosy: + python-dev
messages: + msg146656
2011-10-30 13:52:51floxsetstatus: open -> closed

components: + Library (Lib), XML

nosy: + flox
messages: + msg146638
resolution: not a bug
stage: resolved
2011-10-30 12:55:54luchenuecreate