Author: Armin Rigo <[email protected]>
Branch: py3.5
Changeset: r89306:a61e1b437115
Date: 2017-01-02 17:13 +0100
http://bitbucket.org/pypy/pypy/changeset/a61e1b437115/

Log:    idna encoding for gethostbyaddr(). Like CPython, hard to test

diff --git a/pypy/module/_socket/interp_func.py 
b/pypy/module/_socket/interp_func.py
--- a/pypy/module/_socket/interp_func.py
+++ b/pypy/module/_socket/interp_func.py
@@ -60,13 +60,13 @@
         raise converted_error(space, e)
     return common_wrapgethost(space, res)
 
-@unwrap_spec(host=str)
-def gethostbyaddr(space, host):
+def gethostbyaddr(space, w_host):
     """gethostbyaddr(host) -> (name, aliaslist, addresslist)
 
     Return the true host name, a list of aliases, and a list of IP addresses,
     for a host.  The host argument is a string giving a host name or IP number.
     """
+    host = encode_idna(space, w_host)
     try:
         res = rsocket.gethostbyaddr(host)
     except SocketError as e:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to