[pypy-commit] pypy py3k: Fix keyword argument in socket.getaddrinfo()

amauryfa noreply at buildbot.pypy.org
Sun Oct 7 21:33:36 CEST 2012


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r57866:74a4e30fc988
Date: 2012-10-07 10:19 +0200
http://bitbucket.org/pypy/pypy/changeset/74a4e30fc988/

Log:	Fix keyword argument in socket.getaddrinfo()

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
@@ -244,14 +244,15 @@
                   space.wrap(str(e)))
     return space.wrap(ip)
 
- at unwrap_spec(family=int, socktype=int, proto=int, flags=int)
+ at unwrap_spec(family=int, type=int, proto=int, flags=int)
 def getaddrinfo(space, w_host, w_port,
-                family=rsocket.AF_UNSPEC, socktype=0, proto=0, flags=0):
-    """getaddrinfo(host, port [, family, socktype, proto, flags])
-        -> list of (family, socktype, proto, canonname, sockaddr)
+                family=rsocket.AF_UNSPEC, type=0, proto=0, flags=0):
+    """getaddrinfo(host, port [, family, type, proto, flags])
+        -> list of (family, type, proto, canonname, sockaddr)
 
     Resolve host and port into addrinfo struct.
     """
+    socktype = type
     # host can be None, string or unicode
     if space.is_w(w_host, space.w_None):
         host = None


More information about the pypy-commit mailing list