Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 990ea42

Browse files
authored
bpo-40208: Remove deprecated has_exec method of SymbolTable (GH-19396)
1 parent a1a0eb4 commit 990ea42

5 files changed

Lines changed: 5 additions & 9 deletions

File tree

Doc/library/symtable.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ Examining Symbol Tables
6767
Return ``True`` if the block has nested namespaces within it. These can
6868
be obtained with :meth:`get_children`.
6969

70-
.. method:: has_exec()
71-
72-
Return ``True`` if the block uses ``exec``.
73-
7470
.. method:: get_identifiers()
7571

7672
Return a list of names of symbols in this table.

Doc/whatsnew/3.9.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,10 @@ Removed
753753
the ``__annotations__`` attribute instead.
754754
(Contributed by Serhiy Storchaka in :issue:`40182`.)
755755

756+
* The :meth:`symtable.SymbolTable.has_exec` method has been removed. It was
757+
deprecated since 2006, and only returning ``False`` when it's called.
758+
(Contributed by Batuhan Taskaya in :issue:`40208`)
759+
756760

757761
Porting to Python 3.9
758762
=====================

Lib/symtable.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@ def is_nested(self):
8282
def has_children(self):
8383
return bool(self._table.children)
8484

85-
def has_exec(self):
86-
"""Return true if the scope uses exec. Deprecated method."""
87-
return False
88-
8985
def get_identifiers(self):
9086
return self._table.symbols.keys()
9187

Lib/test/test_symtable.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ def test_type(self):
6565

6666
def test_optimized(self):
6767
self.assertFalse(self.top.is_optimized())
68-
self.assertFalse(self.top.has_exec())
6968

7069
self.assertTrue(self.spam.is_optimized())
7170

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove deprecated :meth:`symtable.SymbolTable.has_exec`.

0 commit comments

Comments
 (0)