← 输入框|github.com|刷新
Skip to content

Remove statics from ast.c #82294

Closed
Closed

Description

@DinoV
BPO 38113
Nosy @vstinner, @DinoV, @ambv, @ericsnowcurrently, @pablogsal, @miss-islington
PRs
  • bpo-38113: Update the Python-ast.c generator to PEP384 #15957
  • bpo-38113: Update Python/ast.c to PEP-384 #15975
  • [3.9] bpo-41631: _ast module uses again a global state (GH-21961) #22258
  • 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 = 'https://github.com/DinoV'
    closed_at = <Date 2019-09-11.17:18:00.182>
    created_at = <Date 2019-09-11.14:05:11.204>
    labels = ['interpreter-core', '3.9']
    title = 'Remove statics from ast.c'
    updated_at = <Date 2020-09-15.18:33:06.174>
    user = 'https://github.com/DinoV'

    bugs.python.org fields:

    activity = <Date 2020-09-15.18:33:06.174>
    actor = 'lukasz.langa'
    assignee = 'dino.viehland'
    closed = True
    closed_date = <Date 2019-09-11.17:18:00.182>
    closer = 'eric.snow'
    components = ['Interpreter Core']
    creation = <Date 2019-09-11.14:05:11.204>
    creator = 'dino.viehland'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38113
    keywords = ['patch']
    message_count = 9.0
    messages = ['351888', '351916', '351952', '351987', '352261', '372927', '375882', '376945', '376949']
    nosy_count = 6.0
    nosy_names = ['vstinner', 'dino.viehland', 'lukasz.langa', 'eric.snow', 'pablogsal', 'miss-islington']
    pr_nums = ['15957', '15975', '22258']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue38113'
    versions = ['Python 3.9']

    Activity

    1. DinoV commented on Sep 11, 2019

      @DinoV
      ContributorAuthor

      Remove various static state from the ast module and make it PEP-384 compatible. This will help make it be more compatible w/ subinterpreters and make it re-usable by 3rd party implementations.

    2. self-assigned this
      on Sep 11, 2019
    3. DinoV commented on Sep 11, 2019

      @DinoV
      ContributorAuthor

      Remove statics to make more compatible with subinterpreters.

    4. added
      interpreter-core(Objects, Python, Grammar, and Parser dirs)
      and removed on Sep 11, 2019
    5. changed the title [-]Make ast module PEP-384 compatible[/-] [+]Remove statics from ast.c[/+] on Sep 11, 2019
    6. miss-islington commented on Sep 11, 2019

      @miss-islington
      Contributor

      New changeset 5b172c2 by Miss Islington (bot) (Dino Viehland) in branch 'master':
      bpo-38113: Update Python/ast.c to PEP-384 (GH-15975)
      5b172c2

    7. ericsnowcurrently commented on Sep 11, 2019

      @ericsnowcurrently
      Member

      New changeset ac46eb4 by Eric Snow (Dino Viehland) in branch 'master':
      bpo-38113: Update the Python-ast.c generator to PEP-384 (gh-15957)
      ac46eb4

    8. vstinner commented on Sep 13, 2019

      @vstinner
      Member

      This change introduced tons of reference leaks, more than 21 test files leak references: see bpo-38152.

      Please fix these leaks, or I will have to revert the change:
      https://pythondev.readthedocs.io/ci.html#revert-on-fail

    9. vstinner commented on Jul 3, 2020

      @vstinner
      Member

      New changeset ac46eb4 by Eric Snow (Dino Viehland) in branch 'master':
      bpo-38113: Update the Python-ast.c generator to PEP-384 (gh-15957)

      This change introduced a subtle regression: bpo-41194. I modified the _ast module to use again a global state:

      New changeset 91e1bc1 by Victor Stinner in branch 'master':
      bpo-41194: The _ast module cannot be loaded more than once (GH-21290)
      91e1bc1

      I also proposed PR 21293 to use again a module state, even if the implementation has some drawbacks (see the PR comments).

    10. vstinner commented on Aug 25, 2020

      @vstinner
      Member

      This change introduced a subtle regression: bpo-41194. I modified the _ast module to use again a global state: (...)

      Sadly, my fix doesn't work in all cases, there is yet another bug: bpo-41631 "_ast module: get_global_ast_state() doesn't work with Mercurial lazy import".

    11. ambv commented on Sep 15, 2020

      @ambv
      Contributor

      New changeset e5fbe0c by Victor Stinner in branch 'master':
      bpo-41631: _ast module uses again a global state (bpo-21961)
      e5fbe0c

    12. ambv commented on Sep 15, 2020

      @ambv
      Contributor

      New changeset 55e0836 by Pablo Galindo in branch '3.9':
      [3.9] bpo-41631: _ast module uses again a global state (GH-21961) (GH-22258)
      55e0836

    13. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    3.9 (EOL)end of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions