diff --git a/Lib/compiler/strict/compiler.py b/Lib/compiler/strict/compiler.py index 41bb9b26406..46b8f71b3dd 100644 --- a/Lib/compiler/strict/compiler.py +++ b/Lib/compiler/strict/compiler.py @@ -6,6 +6,7 @@ import builtins import logging import os +import symtable import sys from contextlib import nullcontext from symtable import SymbolTable as PythonSymbolTable, SymbolTableFactory @@ -184,7 +185,7 @@ def load_compiled_module_from_source( error = errors[0] raise StrictModuleError(error[0], error[1], error[2], error[3]) elif is_valid_strict: - symbols = getSymbolTable(mod) + symbols = symtable.symtable(source, filename, "exec") try: check_class_conflict(pyast, filename, symbols) except StrictModuleError as e: