Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated symtable.SymbolTable.has_exec #84389

Closed
isidentical opened this issue Apr 6, 2020 · 6 comments
Closed

Remove deprecated symtable.SymbolTable.has_exec #84389

isidentical opened this issue Apr 6, 2020 · 6 comments
Labels
3.9 only security fixes stdlib Python modules in the Lib dir

Comments

@isidentical
Copy link
Member

BPO 40208
Nosy @gvanrossum, @terryjreedy, @corona10, @isidentical
PRs
  • bpo-40208: Remove deprecated has_exec method of SymbolTable #19396
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2020-04-13.23:58:43.722>
    created_at = <Date 2020-04-06.17:05:22.894>
    labels = ['library', '3.9']
    title = 'Remove deprecated symtable.SymbolTable.has_exec'
    updated_at = <Date 2020-04-13.23:58:43.721>
    user = 'https://github.com/isidentical'

    bugs.python.org fields:

    activity = <Date 2020-04-13.23:58:43.721>
    actor = 'corona10'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-04-13.23:58:43.722>
    closer = 'corona10'
    components = ['Library (Lib)']
    creation = <Date 2020-04-06.17:05:22.894>
    creator = 'BTaskaya'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40208
    keywords = ['patch']
    message_count = 6.0
    messages = ['365874', '366176', '366177', '366185', '366350', '366351']
    nosy_count = 4.0
    nosy_names = ['gvanrossum', 'terry.reedy', 'corona10', 'BTaskaya']
    pr_nums = ['19396']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue40208'
    versions = ['Python 3.9']

    @isidentical
    Copy link
    Member Author

    SymbolTable's has_exec method deprecated 14 years ago (2006) with 2def557, it can be safely removed since there is no user of it.

    @isidentical isidentical added 3.9 only security fixes stdlib Python modules in the Lib dir labels Apr 6, 2020
    @terryjreedy
    Copy link
    Member

    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 2def557 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?

    @terryjreedy terryjreedy changed the title Remove deprecated SymbolTable.has_exec Remove deprecated symtable.SymbolTable.has_exec Apr 11, 2020
    @terryjreedy
    Copy link
    Member

    Answer: no. The 2006 patch already removed OPT_EXEC and OPT_BARE_EXEC.

    @gvanrossum
    Copy link
    Member

    Yeah, this seems safe to remove. If somebody's code breaks, that will just help them remove some dead code.

    @corona10
    Copy link
    Member

    New changeset 990ea42 by Batuhan Taşkaya in branch 'master':
    bpo-40208: Remove deprecated has_exec method of SymbolTable (GH-19396)
    990ea42

    @corona10
    Copy link
    Member

    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.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants