[Python-checkins] (no subject)
Batuhan Taşkaya
webhook-mailer at python.org
Mon Apr 13 19:51:40 EDT 2020
To: python-checkins at python.org
Subject:
bpo-40208: Remove deprecated has_exec method of SymbolTable (GH-19396)
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
https://github.com/python/cpython/commit/990ea4200f05fcd8bce3de363f4d7745ae14=
2385
commit: 990ea4200f05fcd8bce3de363f4d7745ae142385
branch: master
author: Batuhan Ta=C5=9Fkaya <batuhanosmantaskaya at gmail.com>
committer: GitHub <noreply at github.com>
date: 2020-04-14T08:51:32+09:00
summary:
bpo-40208: Remove deprecated has_exec method of SymbolTable (GH-19396)
files:
A Misc/NEWS.d/next/Library/2020-04-06-20-09-33.bpo-40208.3rO_q7.rst
M Doc/library/symtable.rst
M Doc/whatsnew/3.9.rst
M Lib/symtable.py
M Lib/test/test_symtable.py
diff --git a/Doc/library/symtable.rst b/Doc/library/symtable.rst
index 7c6ac4dccf8b7..3efdecb5af710 100644
--- a/Doc/library/symtable.rst
+++ b/Doc/library/symtable.rst
@@ -67,10 +67,6 @@ Examining Symbol Tables
Return ``True`` if the block has nested namespaces within it. These c=
an
be obtained with :meth:`get_children`.
=20
- .. method:: has_exec()
-
- Return ``True`` if the block uses ``exec``.
-
.. method:: get_identifiers()
=20
Return a list of names of symbols in this table.
diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst
index 1bbcae36a1a10..afb099a4ec558 100644
--- a/Doc/whatsnew/3.9.rst
+++ b/Doc/whatsnew/3.9.rst
@@ -753,6 +753,10 @@ Removed
the ``__annotations__`` attribute instead.
(Contributed by Serhiy Storchaka in :issue:`40182`.)
=20
+* The :meth:`symtable.SymbolTable.has_exec` method has been removed. It was
+ deprecated since 2006, and only returning ``False`` when it's called.
+ (Contributed by Batuhan Taskaya in :issue:`40208`)
+
=20
Porting to Python 3.9
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
diff --git a/Lib/symtable.py b/Lib/symtable.py
index ac0a64ff58f79..a711676582f64 100644
--- a/Lib/symtable.py
+++ b/Lib/symtable.py
@@ -82,10 +82,6 @@ def is_nested(self):
def has_children(self):
return bool(self._table.children)
=20
- def has_exec(self):
- """Return true if the scope uses exec. Deprecated method."""
- return False
-
def get_identifiers(self):
return self._table.symbols.keys()
=20
diff --git a/Lib/test/test_symtable.py b/Lib/test/test_symtable.py
index 98d718c8ab1b1..d19355888e4b3 100644
--- a/Lib/test/test_symtable.py
+++ b/Lib/test/test_symtable.py
@@ -65,7 +65,6 @@ def test_type(self):
=20
def test_optimized(self):
self.assertFalse(self.top.is_optimized())
- self.assertFalse(self.top.has_exec())
=20
self.assertTrue(self.spam.is_optimized())
=20
diff --git a/Misc/NEWS.d/next/Library/2020-04-06-20-09-33.bpo-40208.3rO_q7.rs=
t b/Misc/NEWS.d/next/Library/2020-04-06-20-09-33.bpo-40208.3rO_q7.rst
new file mode 100644
index 0000000000000..a06d5eadf3da8
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2020-04-06-20-09-33.bpo-40208.3rO_q7.rst
@@ -0,0 +1 @@
+Remove deprecated :meth:`symtable.SymbolTable.has_exec`.
More information about the Python-checkins
mailing list