From ddc6eda10a7eb5d4d49d54b704498a5ff0868191 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 21 May 2022 08:50:27 -0700 Subject: [PATCH] symtable: has_exec was removed in 3.9 (#7911) --- stdlib/symtable.pyi | 4 +++- tests/stubtest_allowlists/py310.txt | 1 - tests/stubtest_allowlists/py311.txt | 1 - tests/stubtest_allowlists/py39.txt | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/stdlib/symtable.pyi b/stdlib/symtable.pyi index 7a95fe5e4..0f48bc9da 100644 --- a/stdlib/symtable.pyi +++ b/stdlib/symtable.pyi @@ -15,7 +15,9 @@ class SymbolTable: def is_optimized(self) -> bool: ... def is_nested(self) -> bool: ... def has_children(self) -> bool: ... - def has_exec(self) -> bool: ... + if sys.version_info < (3, 9): + def has_exec(self) -> bool: ... + def get_identifiers(self) -> Sequence[str]: ... def lookup(self, name: str) -> Symbol: ... def get_symbols(self) -> list[Symbol]: ... diff --git a/tests/stubtest_allowlists/py310.txt b/tests/stubtest_allowlists/py310.txt index 1a2034f8b..e6bc74afc 100644 --- a/tests/stubtest_allowlists/py310.txt +++ b/tests/stubtest_allowlists/py310.txt @@ -32,7 +32,6 @@ platform.uname_result.__new__ platform.uname_result._fields platform.uname_result.processor re.Pattern.scanner # Undocumented and not useful. #6405 -symtable.SymbolTable.has_exec sys.UnraisableHookArgs # Not exported from sys tkinter.Tk.split types.GenericAlias.__getattr__ diff --git a/tests/stubtest_allowlists/py311.txt b/tests/stubtest_allowlists/py311.txt index 4b65b6245..a8e210521 100644 --- a/tests/stubtest_allowlists/py311.txt +++ b/tests/stubtest_allowlists/py311.txt @@ -78,7 +78,6 @@ shutil.rmtree socketserver.UDPServer.allow_reuse_port string.Template.get_identifiers string.Template.is_valid -symtable.SymbolTable.has_exec sys.UnraisableHookArgs # Not exported from sys sys.exception tkinter._VersionInfoType.__doc__ diff --git a/tests/stubtest_allowlists/py39.txt b/tests/stubtest_allowlists/py39.txt index 162ec03d9..6acb7a3eb 100644 --- a/tests/stubtest_allowlists/py39.txt +++ b/tests/stubtest_allowlists/py39.txt @@ -56,7 +56,6 @@ re.Pattern.scanner # Undocumented and not useful. #6405 sched.Event.__doc__ # __slots__ is overridden ssl.PROTOCOL_SSLv3 # Depends on ssl compilation ssl.RAND_egd # Depends on openssl compilation -symtable.SymbolTable.has_exec sys.UnraisableHookArgs # Not exported from sys tkinter.Tk.split types.CodeType.replace # stubtest thinks default values are None but None doesn't work at runtime