mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Remove filename variable from ceval.c
Issue #11168: Remove filename debug variable from PyEval_EvalFrameEx(). It encoded the Unicode filename to UTF-8, but the encoding fails on undecodable filename (on surrogate characters) which raises an unexpected UnicodeEncodeError on recursion limit.
This commit is contained in:
parent
441cc01e0f
commit
ed4c71112a
2 changed files with 6 additions and 17 deletions
|
@ -10,12 +10,17 @@ What's New in Python 3.3 Alpha 1?
|
||||||
Core and Builtins
|
Core and Builtins
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
- Check for NULL result in PyType_FromSpec.
|
- Issue #11168: Remove filename debug variable from PyEval_EvalFrameEx().
|
||||||
|
It encoded the Unicode filename to UTF-8, but the encoding fails on
|
||||||
|
undecodable filename (on surrogate characters) which raises an unexpected
|
||||||
|
UnicodeEncodeError on recursion limit.
|
||||||
|
|
||||||
- Issue #11187: Remove bootstrap code (use ASCII) of
|
- Issue #11187: Remove bootstrap code (use ASCII) of
|
||||||
PyUnicode_AsEncodedString(), it was replaced by a better fallback (use the
|
PyUnicode_AsEncodedString(), it was replaced by a better fallback (use the
|
||||||
locale encoding) in PyUnicode_EncodeFSDefault().
|
locale encoding) in PyUnicode_EncodeFSDefault().
|
||||||
|
|
||||||
|
- Check for NULL result in PyType_FromSpec.
|
||||||
|
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|
|
@ -811,10 +811,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
|
||||||
unsigned char *first_instr;
|
unsigned char *first_instr;
|
||||||
PyObject *names;
|
PyObject *names;
|
||||||
PyObject *consts;
|
PyObject *consts;
|
||||||
#if defined(Py_DEBUG) || defined(LLTRACE)
|
|
||||||
/* Make it easier to find out where we are with a debugger */
|
|
||||||
char *filename;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Computed GOTOs, or
|
/* Computed GOTOs, or
|
||||||
the-optimization-commonly-but-improperly-known-as-"threaded code"
|
the-optimization-commonly-but-improperly-known-as-"threaded code"
|
||||||
|
@ -1227,18 +1223,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
|
||||||
#ifdef LLTRACE
|
#ifdef LLTRACE
|
||||||
lltrace = PyDict_GetItemString(f->f_globals, "__lltrace__") != NULL;
|
lltrace = PyDict_GetItemString(f->f_globals, "__lltrace__") != NULL;
|
||||||
#endif
|
#endif
|
||||||
#if defined(Py_DEBUG) || defined(LLTRACE)
|
|
||||||
{
|
|
||||||
PyObject *error_type, *error_value, *error_traceback;
|
|
||||||
PyErr_Fetch(&error_type, &error_value, &error_traceback);
|
|
||||||
filename = _PyUnicode_AsString(co->co_filename);
|
|
||||||
if (filename == NULL && tstate->overflowed) {
|
|
||||||
/* maximum recursion depth exceeded */
|
|
||||||
goto exit_eval_frame;
|
|
||||||
}
|
|
||||||
PyErr_Restore(error_type, error_value, error_traceback);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
why = WHY_NOT;
|
why = WHY_NOT;
|
||||||
err = 0;
|
err = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue