merge 3.3 (#19393)
This commit is contained in:
commit
77353664e2
|
@ -10,10 +10,7 @@ import weakref
|
|||
__all__ = ["symtable", "SymbolTable", "Class", "Function", "Symbol"]
|
||||
|
||||
def symtable(code, filename, compile_type):
|
||||
raw = _symtable.symtable(code, filename, compile_type)
|
||||
for top in raw.values():
|
||||
if top.name == 'top':
|
||||
break
|
||||
top = _symtable.symtable(code, filename, compile_type)
|
||||
return _newSymbolTable(top, filename)
|
||||
|
||||
class SymbolTableFactory:
|
||||
|
|
|
@ -26,6 +26,9 @@ Library
|
|||
contextlib.suppress context managers, which also ensures they provide
|
||||
reasonable help() output on instances
|
||||
|
||||
- Issue #19393: Fix symtable.symtable function to not be confused when there are
|
||||
functions or classes named "top".
|
||||
|
||||
- Issue #18685: Restore re performance to pre-PEP 393 levels.
|
||||
|
||||
- Issue #19339: telnetlib module is now using time.monotonic() when available
|
||||
|
|
|
@ -34,7 +34,7 @@ symtable_symtable(PyObject *self, PyObject *args)
|
|||
Py_DECREF(filename);
|
||||
if (st == NULL)
|
||||
return NULL;
|
||||
t = st->st_blocks;
|
||||
t = (PyObject *)st->st_top;
|
||||
Py_INCREF(t);
|
||||
PyMem_Free((void *)st->st_future);
|
||||
PySymtable_Free(st);
|
||||
|
|
Loading…
Reference in New Issue