From: Benjamin Peterson Date: Tue, 11 Feb 2014 03:41:40 +0000 (-0500) Subject: merge 3.3 (#20588) X-Git-Tag: v3.4.1rc1~233^2~362 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=42ec031fe75601710b4edbfe7e617b97b4948de6;p=thirdparty%2FPython%2Fcpython.git merge 3.3 (#20588) --- 42ec031fe75601710b4edbfe7e617b97b4948de6 diff --cc Misc/NEWS index 4b326ff98e06,ac1ba0da2ba6..06223600ac2f --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -10,28 -10,13 +10,30 @@@ Release date: 2014-02-0 Core and Builtins ----------------- +- Issue #19255: The builtins module is restored to initial value before + cleaning other modules. The sys and builtins modules are cleaned last. + + - Issue #20588: Make Python-ast.c C89 compliant. + -- Issue #20437: Fixed 21 potential bugs when deleting objects references. +- Issue #20437: Fixed 22 potential bugs when deleting objects references. + +- Issue #20500: Displaying an exception at interpreter shutdown no longer + risks triggering an assertion failure in PyObject_Str. -- Issue #20538: UTF-7 incremental decoder produced inconsistant string when +- Issue #20538: UTF-7 incremental decoder produced inconsistent string when input was truncated in BASE64 section. +- Issue #20404: io.TextIOWrapper (and hence the open() builtin) now uses the + internal codec marking system added for issue #19619 to throw LookupError + for known non-text encodings at stream construction time. The existing + output type checks remain in place to deal with unmarked third party + codecs. + +- Issue #17162: Add PyType_GetSlot. + +- Issue #20162: Fix an alignment issue in the siphash24() hash function which + caused a crash on PowerPC 64-bit (ppc64). + Library ------- diff --cc Parser/asdl_c.py index 80e432a3e960,4b84e0fd6b2a..d6086e68bf2c --- a/Parser/asdl_c.py +++ b/Parser/asdl_c.py @@@ -1203,14 -1150,17 +1203,18 @@@ PyObject* PyAST_mod2obj(mod_ty t mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode) { mod_ty res; - PyObject *req_type[] = {(PyObject*)Module_type, (PyObject*)Expression_type, - (PyObject*)Interactive_type}; + PyObject *req_type[3]; char *req_name[] = {"Module", "Expression", "Interactive"}; int isinstance; + + req_type[0] = (PyObject*)Module_type; + req_type[1] = (PyObject*)Expression_type; + req_type[2] = (PyObject*)Interactive_type; + assert(0 <= mode && mode <= 2); - init_types(); + if (!init_types()) + return NULL; isinstance = PyObject_IsInstance(ast, req_type[mode]); if (isinstance == -1) diff --cc Python/Python-ast.c index e07a93fee8fb,aa032338af76..44fdafc50aef --- a/Python/Python-ast.c +++ b/Python/Python-ast.c @@@ -7023,14 -6957,17 +7023,18 @@@ PyObject* PyAST_mod2obj(mod_ty t mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode) { mod_ty res; - PyObject *req_type[] = {(PyObject*)Module_type, (PyObject*)Expression_type, - (PyObject*)Interactive_type}; + PyObject *req_type[3]; char *req_name[] = {"Module", "Expression", "Interactive"}; int isinstance; - ++ + req_type[0] = (PyObject*)Module_type; + req_type[1] = (PyObject*)Expression_type; + req_type[2] = (PyObject*)Interactive_type; - ++ assert(0 <= mode && mode <= 2); - init_types(); + if (!init_types()) + return NULL; isinstance = PyObject_IsInstance(ast, req_type[mode]); if (isinstance == -1)