[ python-Bugs-841757 ] xmlrpclib chokes on Unicode keys
SourceForge.net
noreply at sourceforge.net
Thu Nov 13 16:43:31 EST 2003
Bugs item #841757, was opened at 2003-11-13 22:43
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=841757&group_id=5470
Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Fredrik Lundh (effbot)
Assigned to: Nobody/Anonymous (nobody)
Summary: xmlrpclib chokes on Unicode keys
Initial Comment:
the type check in dump_struct is too strict; I suggest
changing the loop to:
for k, v in value.items():
write("<member>\n")
if type(k) is UnicodeType:
k = k.encode(self.encoding)
elif type(k) is not StringType:
raise TypeError, "dictionary key must
be string"
write("<name>%s</name>\n" % escape(k))
dump(v, write)
write("</member>\n")
ths applies to all Python versions since 2.2.
backport as necessary.
regards /F
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=841757&group_id=5470
More information about the Python-bugs-list
mailing list