diff -r c4839c36a71f Python/ast.c --- a/Python/ast.c Sun Jun 26 17:47:46 2016 +0300 +++ b/Python/ast.c Sun Jun 26 22:49:37 2016 +0300 @@ -475,8 +475,8 @@ validate_stmt(stmt_ty stmt) case Import_kind: return validate_nonempty_seq(stmt->v.Import.names, "names", "Import"); case ImportFrom_kind: - if (stmt->v.ImportFrom.level < -1) { - PyErr_SetString(PyExc_ValueError, "ImportFrom level less than -1"); + if (stmt->v.ImportFrom.level < 0) { + PyErr_SetString(PyExc_ValueError, "Negative ImportFrom level"); return 0; } return validate_nonempty_seq(stmt->v.ImportFrom.names, "names", "ImportFrom"); diff -r c4839c36a71f Python/ceval.c --- a/Python/ceval.c Sun Jun 26 17:47:46 2016 +0300 +++ b/Python/ceval.c Sun Jun 26 22:49:37 2016 +0300 @@ -2815,21 +2815,13 @@ PyEval_EvalFrameEx(PyFrameObject *f, int Py_INCREF(func); from = POP(); level = TOP(); - if (PyLong_AsLong(level) != -1 || PyErr_Occurred()) - args = PyTuple_Pack(5, + args = PyTuple_Pack(5, name, f->f_globals, f->f_locals == NULL ? Py_None : f->f_locals, from, level); - else - args = PyTuple_Pack(4, - name, - f->f_globals, - f->f_locals == NULL ? - Py_None : f->f_locals, - from); Py_DECREF(level); Py_DECREF(from); if (args == NULL) {