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 — Create companion methods of "PyType_FromSpec*" to allow setting metaclass. · Issue #85343 · python/cpython

Create companion methods of "PyType_FromSpec*" to allow setting metaclass. #85343

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Create companion methods of "PyType_FromSpec*" to allow setting metaclass.#85343
Copy link
Labels
3.10 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of lifetopic-C-APItype-featureA feature request or enhancementA feature request or enhancement

Description

WildCard65
mannequin
opened on Jun 30, 2020
Issue body actions
BPO 41171
Nosy @WildCard65
PRs
  • bpo-41171: Added method "PyMetaType_FromSpec" to allow for specifying the metaclass for the type. #21238
  • 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 2020-06-30.15:34:35.127>
    labels = ['expert-C-API', 'type-feature', '3.8', '3.9', '3.10']
    title = 'Create companion methods of "PyType_FromSpec*" to allow setting metaclass.'
    updated_at = <Date 2020-06-30.16:29:58.229>
    user = 'https://github.com/WildCard65'

    bugs.python.org fields:

    activity = <Date 2020-06-30.16:29:58.229>
    actor = 'WildCard65'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['C API']
    creation = <Date 2020-06-30.15:34:35.127>
    creator = 'WildCard65'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 41171
    keywords = ['patch']
    message_count = 2.0
    messages = ['372696', '372697']
    nosy_count = 1.0
    nosy_names = ['WildCard65']
    pr_nums = ['21238']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue41171'
    versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

    Activity

    1. WildCard65 commented on Jun 30, 2020

      @WildCard65
      WildCard65mannequin
      on Jun 30, 2020
      MannequinAuthor
      More actions

      The current goal from what I can tell for Python is to have all C based modules move away from static types and instead use "PyType_FromSpec" and the variant that specifies base classes.

      The only problem is, PyType_FromSpec and it's variant makes the assumption the caller wants "PyType_Type" as the type's metaclass.

      Why not add companion methods to them prefixed with "PyMetaType" and have the "PyType" ones internally invoke these new methods with "PyType_Type" as the metaclass (to keep existing behavior and backwards compatibility)

    2. WildCard65
      added
      3.8 (EOL)end of lifeend of life
      3.9 (EOL)end of lifeend of life
      3.10 (EOL)end of lifeend of life
      topic-C-API
      type-featureA feature request or enhancementA feature request or enhancement
      on Jun 30, 2020
    3. WildCard65 commented on Jun 30, 2020

      @WildCard65
      WildCard65mannequin
      on Jun 30, 2020
      MannequinAuthor
      More actions

      Another thing I thought of, if this is accepted, we can turn the "PyType" methods into header static inline methods.

    4. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    5. kumaraditya303 commented on Nov 30, 2022

      @kumaraditya303
      kumaraditya303
      on Nov 30, 2022
      Contributor
      More actions

      Duplicate of #60074

    6. kumaraditya303
      marked this as a duplicate of PyType_FromSpec should take metaclass as an argument #60074 on Nov 30, 2022
    7. kumaraditya303
      closed this as not plannedon Nov 30, 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.10 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of lifetopic-C-APItype-featureA feature request or enhancementA feature request or enhancement

      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.