[Python-Dev] [Python-checkins] cpython (2.7): Issue #12931: xmlrpclib now encodes Unicode URI to ISO-8859-1, instead of

Éric Araujo merwok at netwok.org
Fri Sep 23 16:35:27 CEST 2011


Hi Victor,

> summary:
>   Issue #12931: xmlrpclib now encodes Unicode URI to ISO-8859-1, instead of
> failing with a UnicodeDecodeError.
> 
> diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py
> --- a/Lib/test/test_xmlrpc.py
> +++ b/Lib/test/test_xmlrpc.py
> @@ -472,6 +472,9 @@
>                  # protocol error; provide additional information in test output
>                  self.fail("%s\n%s" % (e, getattr(e, "headers", "")))
>  
> +    def test_unicode_host(self):
> +        server = xmlrpclib.ServerProxy(u"http://%s:%d/RPC2"%(ADDR, PORT))

Spaces around the modulo operator would have been nice here.
Readability counts :)


More information about the Python-Dev mailing list