GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Statically Initialize PyArg_Parser in clinic.py · Issue #90928 · python/cpython

Statically Initialize PyArg_Parser in clinic.py #90928

New issue
Copy link
New issue
Copy link
Closed
Closed
Statically Initialize PyArg_Parser in clinic.py#90928
Copy link
Assignees
ericsnowcurrently
Labels
3.11only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)

Description

@ericsnowcurrently
ericsnowcurrently
opened on Feb 16, 2022
Issue body actions
BPO 46772
Nosy @ericsnowcurrently
Dependencies
  • bpo-46753: Statically allocate and initialize the empty tuple.
  • bpo-46773: Add a Private API for Looking Up Global Objects
  • 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/ericsnowcurrently'
    closed_at = None
    created_at = <Date 2022-02-16.18:32:25.886>
    labels = ['interpreter-core', '3.11']
    title = 'Statically Initialize PyArg_Parser in clinic.py'
    updated_at = <Date 2022-02-16.18:36:54.761>
    user = 'https://github.com/ericsnowcurrently'

    bugs.python.org fields:

    activity = <Date 2022-02-16.18:36:54.761>
    actor = 'eric.snow'
    assignee = 'eric.snow'
    closed = False
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2022-02-16.18:32:25.886>
    creator = 'eric.snow'
    dependencies = ['46753', '46773']
    files = []
    hgrepos = []
    issue_num = 46772
    keywords = []
    message_count = 1.0
    messages = ['413351']
    nosy_count = 1.0
    nosy_names = ['eric.snow']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'needs patch'
    status = 'open'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue46772'
    versions = ['Python 3.11']

    Activity

    1. ericsnowcurrently commented on Feb 16, 2022

      @ericsnowcurrently
      ericsnowcurrently
      on Feb 16, 2022
      MemberAuthor
      More actions

      The code generated by clinic.py is already partially statically initialized. Currently we init the other fields in Python/getargs.c:parser_init(), which runs the first time we try to use each parser. AFAICS, that remaining init that could be done statically using the data we have available in clinic.py during code generation.

      My primary interest is in static init of PyArg_Parser.kwtuple, which is a tuple containing only strings.

    2. ericsnowcurrently
      added
      3.11only security fixesonly security fixes
      on Feb 16, 2022
    3. ericsnowcurrently
      self-assigned this
      on Feb 16, 2022
    4. ericsnowcurrently
      added
      interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
      3.11only security fixesonly security fixes
      on Feb 16, 2022
    5. ericsnowcurrently
      self-assigned this
      on Feb 16, 2022
    6. ericsnowcurrently
      added
      interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
      on Feb 16, 2022
    7. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    8. ericsnowcurrently
      added a commit that references this issue on Aug 11, 2022

      gh-90928: Statically Initialize the Keywords Tuple in Clinic-Generate…

      6f6a4e6
    9. ericsnowcurrently commented on Aug 12, 2022

      @ericsnowcurrently
      ericsnowcurrently
      on Aug 12, 2022
      MemberAuthor
      More actions

      gh-95909 follows up on interpreter isolation for PyArg_Parser.

    10. ericsnowcurrently
      closed this as completedon Aug 12, 2022
    11. erlend-aasland
      added a commit that references this issue on Aug 13, 2022

      gh-90928: Improve static initialization of keywords tuple in AC (#95907)

      f07adf8
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    • @ericsnowcurrently
      ericsnowcurrently

    Labels

    3.11only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.