diff -r 751328f413a8 Modules/socketmodule.c --- a/Modules/socketmodule.c Sat Aug 02 22:32:33 2014 -0700 +++ b/Modules/socketmodule.c Mon Aug 04 18:54:04 2014 +0300 @@ -1318,6 +1318,8 @@ return 0; } if (!PyArg_ParseTuple(args, "eti:getsockaddrarg", + "ascii", &host, &port) && + !PyArg_ParseTuple(args, "eti:getsockaddrarg", "idna", &host, &port)) return 0; addr=(struct sockaddr_in*)addr_ret; @@ -1355,6 +1357,9 @@ return 0; } if (!PyArg_ParseTuple(args, "eti|II", + "ascii", &host, &port, &flowinfo, + &scope_id) && + !PyArg_ParseTuple(args, "eti|II", "idna", &host, &port, &flowinfo, &scope_id)) { return 0;