This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Remove deprecated symtable.SymbolTable.has_exec
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: BTaskaya, corona10, gvanrossum, terry.reedy
Priority: normal Keywords: patch

Created on 2020-04-06 17:05 by BTaskaya, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 19396 merged BTaskaya, 2020-04-06 17:12
Messages (6)
msg365874 - (view) Author: Batuhan Taskaya (BTaskaya) * (Python committer) Date: 2020-04-06 17:05
SymbolTable's has_exec method deprecated 14 years ago (2006) with 2def557aba1aaa42b638f9bf95624b7e6929191c, it can be safely removed since there is no user of it.
msg366176 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-04-11 01:35
https://docs.python.org/3/library/symtable.html#symtable.SymbolTable.has_exec
merely says "Return True if the block uses exec."  This never happens since
https://github.com/python/cpython/blob/3.8/Lib/symtable.py#L87
is "return False".  I presume 'exec' refers to 2.x statement, not the 3.x function.  The docstring on line 86 does say "Deprecated method."

Guido, you changed these lines in 2006, in 2def557aba1aaa42b638f9bf95624b7e6929191c  I presume you left them for the benefit of ported 2.7 code.  Should the function be removed for 3.9 or left until 3.10?  Your commit message referred to 'dead EXEC related constants'.  Is there anything else that should be removed?
msg366177 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-04-11 01:37
Answer: no.  The 2006 patch already removed OPT_EXEC and OPT_BARE_EXEC.
msg366185 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2020-04-11 03:33
Yeah, this seems safe to remove. If somebody's code breaks, that will just help them remove some dead code.
msg366350 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2020-04-13 23:51
New changeset 990ea4200f05fcd8bce3de363f4d7745ae142385 by Batuhan Taşkaya in branch 'master':
bpo-40208: Remove deprecated has_exec method of SymbolTable (GH-19396)
https://github.com/python/cpython/commit/990ea4200f05fcd8bce3de363f4d7745ae142385
msg366351 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2020-04-13 23:58
The deletion of this symtable.SymbolTable.has_exec is now landed.
I would like to thank Batuhan and all the reviewers who have participated in this issue.

It's time for us to say goodbye to symtable.SymbolTable.has_exec.
History
Date User Action Args
2022-04-11 14:59:29adminsetgithub: 84389
2020-04-13 23:58:43corona10setstatus: open -> closed
resolution: fixed
messages: + msg366351

stage: patch review -> resolved
2020-04-13 23:51:38corona10setnosy: + corona10
messages: + msg366350
2020-04-11 03:33:09gvanrossumsetmessages: + msg366185
2020-04-11 01:37:17terry.reedysetmessages: + msg366177
2020-04-11 01:35:53terry.reedysetnosy: + gvanrossum, terry.reedy

messages: + msg366176
title: Remove deprecated SymbolTable.has_exec -> Remove deprecated symtable.SymbolTable.has_exec
2020-04-06 17:12:23BTaskayasetkeywords: + patch
stage: patch review
pull_requests: + pull_request18758
2020-04-06 17:05:22BTaskayacreate