Skip to content

PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset #84764

Closed

Description

@shihai1991
BPO 40584
Nosy @vstinner, @encukou, @shihai1991
PRs
  • bpo-40584: Update PyType_FromModuleAndSpec to process tp_vectorcall_offset #20026
  • 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-05-11.21:41:15.546>
    created_at = <Date 2020-05-10.17:07:23.615>
    labels = ['interpreter-core', '3.9']
    title = 'PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset'
    updated_at = <Date 2020-05-11.21:41:29.917>
    user = 'https://github.com/shihai1991'

    bugs.python.org fields:

    activity = <Date 2020-05-11.21:41:29.917>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-05-11.21:41:15.546>
    closer = 'vstinner'
    components = ['Interpreter Core']
    creation = <Date 2020-05-10.17:07:23.615>
    creator = 'shihai1991'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40584
    keywords = ['patch']
    message_count = 5.0
    messages = ['368589', '368621', '368633', '368659', '368660']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'petr.viktorin', 'shihai1991']
    pr_nums = ['20026']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'patch review'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue40584'
    versions = ['Python 3.9']

    Activity

    1. shihai1991 commented on May 10, 2020

      @shihai1991
      MemberAuthor

      some typeobject using tp_vectorcall_offset, if we use PyType_FromModuleAndSpec to create the the typeobject, it will be faild due to PyType_FromModuleAndSpec lack the process of tp_vectorcall_offset.

      so we should adding some process like https://github.com/python/cpython/blob/master/Objects/typeobject.c#L2966-L2976.

    2. added
      3.9 (EOL)
      interpreter-core
      on May 10, 2020
    3. encukou commented on May 11, 2020

      @encukou
      Member

      That seems reasonable. See the discussion around https://bugs.python.org/issue38140 for context.

      Note that __dictoffset__ and __weaklistoffset__ are also exposed as members (in PyMemberDef type_members) and documented (Doc/c-api/structures.rst). A new __vectorcalloffset__ should have that as well.

    4. shihai1991 commented on May 11, 2020

      @shihai1991
      MemberAuthor

      Note that __dictoffset__ and __weaklistoffset__ are also exposed as members (in PyMemberDef type_members) and documented (Doc/c-api/structures.rst). A new __vectorcalloffset__ should have that as well.

      Thanks for your comment, petr. And I updated the doc in PR20026.

    5. vstinner commented on May 11, 2020

      @vstinner
      Member

      New changeset 86d6944 by Hai Shi in branch 'master':
      bpo-40584: Update PyType_FromModuleAndSpec() to process tp_vectorcall_offset (GH-20026)
      86d6944

    6. vstinner commented on May 11, 2020

      @vstinner
      Member

      Thanks Hai Shi!

    7. 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

    No one assigned

      Labels

      3.9 (EOL)interpreter-core

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions