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 — Add PyType_GetModuleByDef to the public & limited API · Issue #90771 · python/cpython

Add PyType_GetModuleByDef to the public & limited API #90771

New issue
Copy link
New issue
Copy link
Closed
Closed
Add PyType_GetModuleByDef to the public & limited API#90771
Copy link
Labels
3.11only security fixesonly security fixestopic-C-API

Description

@encukou
encukou
opened on Feb 2, 2022
Issue body actions
BPO 46613
Nosy @encukou, @shihai1991
PRs
  • bpo-46613: Add PyType_GetModuleByDef to the public & limited API #31081
  • 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 = None
    created_at = <Date 2022-02-02.16:55:22.816>
    labels = ['expert-C-API', '3.11']
    title = 'Add PyType_GetModuleByDef to the public & limited API'
    updated_at = <Date 2022-02-11.16:23:15.131>
    user = 'https://github.com/encukou'

    bugs.python.org fields:

    activity = <Date 2022-02-11.16:23:15.131>
    actor = 'petr.viktorin'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['C API']
    creation = <Date 2022-02-02.16:55:22.816>
    creator = 'petr.viktorin'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46613
    keywords = ['patch']
    message_count = 3.0
    messages = ['412378', '413082', '413083']
    nosy_count = 2.0
    nosy_names = ['petr.viktorin', 'shihai1991']
    pr_nums = ['31081']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue46613'
    versions = ['Python 3.11']

    Activity

    1. encukou commented on Feb 2, 2022

      @encukou
      encukou
      on Feb 2, 2022
      MemberAuthor
      More actions

      _PyType_GetModuleByDef (added in bpo-42100)allows module state access
      from slot methods (like tp_init or nb_add),
      the main thing missing from PEP-573 (Module State Access from C
      Extension Methods).
      It's time to make it public.

      The function itself can be implemented using only limited API, though
      it's a bit tricky to do so correctly (and our implementation uses
      private speedups), so it's better if extension authors can use it as a
      pre-made building block.

      Discussed in: https://mail.python.org/archives/list/[email protected]/thread/WMSDNMQ7A6LE6X4MQW4QAQUKDDL7MJ72/
      Note that a bug was found in the CPython optimization recently: bpo-46433

    2. encukou
      added
      3.11only security fixesonly security fixes
      topic-C-API
      on Feb 2, 2022
    3. encukou commented on Feb 11, 2022

      @encukou
      encukou
      on Feb 11, 2022
      MemberAuthor
      More actions

      New changeset 2049469 by Petr Viktorin in branch 'main':
      bpo-46613: Add PyType_GetModuleByDef to the public API (GH-31081)
      2049469

    4. encukou commented on Feb 11, 2022

      @encukou
      encukou
      on Feb 11, 2022
      MemberAuthor
      More actions

      It's in public API, adding it to limited is still pending.

    5. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    6. AA-Turner
      added a commit that references this issue on Sep 13, 2023

      bpo-46613: Add PyType_GetModuleByDef to the public API (python/cpytho…

      9d1a7ad
    7. erlend-aasland
      added a commit that references this issue on Sep 26, 2023

      bpo-46613: Add PyType_GetModuleByDef to the public API (python/cpytho…

      67be7bd
    8. vstinner commented on Mar 18, 2024

      @vstinner
      vstinner
      on Mar 18, 2024
      Member
      More actions

      It's in public API, adding it to limited is still pending.

      I created issue gh-116936 for that. I close this issue.

    9. vstinner
      closed this as completedon Mar 18, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.11only security fixesonly security fixestopic-C-API

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions

        You are visitor 01402503 — 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.