mirror of https://github.com/python/cpython
Add a NEWS entry for issue2221.
Also don't flush stdout on each call to exec() or eval(). Only interactive input really needs it.
This commit is contained in:
parent
7852000928
commit
7fedbe513d
|
@ -12,6 +12,10 @@ What's New in Python 3.0a5?
|
||||||
Core and Builtins
|
Core and Builtins
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
- Issue #2221: Corrected a SystemError "error return without exception set",
|
||||||
|
when the code executed by exec() raises an exception, and sys.stdout.flush()
|
||||||
|
also raises an error.
|
||||||
|
|
||||||
- Bug #2565: The repr() of type objects now calls them 'class',
|
- Bug #2565: The repr() of type objects now calls them 'class',
|
||||||
not 'type' - whether they are builtin types or not.
|
not 'type' - whether they are builtin types or not.
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,7 @@ extern grammar _PyParser_Grammar; /* From graminit.c */
|
||||||
static void initmain(void);
|
static void initmain(void);
|
||||||
static void initsite(void);
|
static void initsite(void);
|
||||||
static int initstdio(void);
|
static int initstdio(void);
|
||||||
|
static void flush_io(void);
|
||||||
static PyObject *run_mod(mod_ty, const char *, PyObject *, PyObject *,
|
static PyObject *run_mod(mod_ty, const char *, PyObject *, PyObject *,
|
||||||
PyCompilerFlags *, PyArena *);
|
PyCompilerFlags *, PyArena *);
|
||||||
static PyObject *run_pyc_file(FILE *, const char *, PyObject *, PyObject *,
|
static PyObject *run_pyc_file(FILE *, const char *, PyObject *, PyObject *,
|
||||||
|
@ -992,6 +993,7 @@ PyRun_InteractiveOneFlags(FILE *fp, const char *filename, PyCompilerFlags *flags
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
v = run_mod(mod, filename, d, d, flags, arena);
|
v = run_mod(mod, filename, d, d, flags, arena);
|
||||||
PyArena_Free(arena);
|
PyArena_Free(arena);
|
||||||
|
flush_io();
|
||||||
if (v == NULL) {
|
if (v == NULL) {
|
||||||
PyErr_Print();
|
PyErr_Print();
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1082,6 +1084,7 @@ PyRun_SimpleFileExFlags(FILE *fp, const char *filename, int closeit,
|
||||||
v = PyRun_FileExFlags(fp, filename, Py_file_input, d, d,
|
v = PyRun_FileExFlags(fp, filename, Py_file_input, d, d,
|
||||||
closeit, flags);
|
closeit, flags);
|
||||||
}
|
}
|
||||||
|
flush_io();
|
||||||
if (v == NULL) {
|
if (v == NULL) {
|
||||||
PyErr_Print();
|
PyErr_Print();
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
@ -1513,7 +1516,6 @@ run_mod(mod_ty mod, const char *filename, PyObject *globals, PyObject *locals,
|
||||||
return NULL;
|
return NULL;
|
||||||
v = PyEval_EvalCode(co, globals, locals);
|
v = PyEval_EvalCode(co, globals, locals);
|
||||||
Py_DECREF(co);
|
Py_DECREF(co);
|
||||||
flush_io();
|
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1546,7 +1548,6 @@ run_pyc_file(FILE *fp, const char *filename, PyObject *globals,
|
||||||
if (v && flags)
|
if (v && flags)
|
||||||
flags->cf_flags |= (co->co_flags & PyCF_MASK);
|
flags->cf_flags |= (co->co_flags & PyCF_MASK);
|
||||||
Py_DECREF(co);
|
Py_DECREF(co);
|
||||||
flush_io();
|
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue