Merge 3.5

This commit is contained in:
Victor Stinner 2015-09-11 12:38:27 +02:00
commit e390410ca4
2 changed files with 7 additions and 3 deletions

View File

@ -103,6 +103,12 @@ Core and Builtins
Library
-------
- Issue #24684: socket.socket.getaddrinfo() now calls
PyUnicode_AsEncodedString() instead of calling the encode() method of the
host, to handle correctly custom string with an encode() method which doesn't
return a byte string. The encoder of the IDNA codec is now called directly
instead of calling the encode() method of the string.
- Issue #25060: Correctly compute stack usage of the BUILD_MAP opcode.
- Issue #24857: Comparing call_args to a long sequence now correctly returns a

View File

@ -5513,9 +5513,7 @@ socket_getaddrinfo(PyObject *self, PyObject *args, PyObject* kwargs)
if (hobj == Py_None) {
hptr = NULL;
} else if (PyUnicode_Check(hobj)) {
_Py_IDENTIFIER(encode);
idna = _PyObject_CallMethodId(hobj, &PyId_encode, "s", "idna");
idna = PyUnicode_AsEncodedString(hobj, "idna", NULL);
if (!idna)
return NULL;
assert(PyBytes_Check(idna));