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 — Update extending/embedding docs to new way to build modules in C · Issue #70702 · python/cpython

Update extending/embedding docs to new way to build modules in C #70702

New issue
Copy link
New issue
Copy link
Closed as duplicate
Closed as duplicate
Update extending/embedding docs to new way to build modules in C#70702
Copy link
Labels
3.9 (EOL)end of lifeend of lifedocsDocumentation in the Doc dirDocumentation in the Doc dirtype-featureA feature request or enhancementA feature request or enhancement

Description

@brettcannon
brettcannon
opened on Mar 9, 2016
Issue body actions
BPO 26515
Nosy @brettcannon, @ncoghlan, @encukou, @ericsnowcurrently, @berkerpeksag
PRs
  • bpo-26515: Update C API docs to use PyModuleDef_Init() #8682
  • 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 2016-03-09.02:43:41.063>
    labels = ['type-feature', '3.9', 'docs']
    title = 'Update extending/embedding docs to new way to build modules in C'
    updated_at = <Date 2020-12-15.15:36:08.559>
    user = 'https://github.com/brettcannon'

    bugs.python.org fields:

    activity = <Date 2020-12-15.15:36:08.559>
    actor = 'petr.viktorin'
    assignee = 'docs@python'
    closed = False
    closed_date = None
    closer = None
    components = ['Documentation']
    creation = <Date 2016-03-09.02:43:41.063>
    creator = 'brett.cannon'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 26515
    keywords = ['patch']
    message_count = 5.0
    messages = ['261398', '342668', '359792', '379432', '383069']
    nosy_count = 6.0
    nosy_names = ['brett.cannon', 'ncoghlan', 'petr.viktorin', 'docs@python', 'eric.snow', 'berker.peksag']
    pr_nums = ['8682']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue26515'
    versions = ['Python 3.9']

    Activity

    1. brettcannon commented on Mar 9, 2016

      @brettcannon
      brettcannon
      on Mar 9, 2016
      MemberAuthor
      More actions

      https://docs.python.org/3/extending/extending.html#a-simple-example uses PyModule_Create() instead of PyModuleDef_Init().

    2. brettcannon
      assigned
      docspython
      on Mar 9, 2016
    3. brettcannon
      added
      docsDocumentation in the Doc dirDocumentation in the Doc dir
      on Mar 9, 2016
    4. berkerpeksag
      added
      3.7 (EOL)end of lifeend of life
      3.8 (EOL)end of lifeend of life
      type-featureA feature request or enhancementA feature request or enhancement
      on Aug 6, 2018
    5. encukou commented on May 16, 2019

      @encukou
      encukou
      on May 16, 2019
      Member
      More actions

      Correct usage of multi-phase init might now get users stuck when they start needing per-module state. See PEP-573 "Module State Access from C Extension Methods" for the (hopefully) last thing that prevents me from generally recommending multi-phase init.

      That PEP is on my list for after PRP 590 is done.
      Before it's implemented, I'm happy leaving PyModuleDef_Init to experts -- that is, have it in the reference docs only.

    6. ncoghlan commented on Jan 11, 2020

      @ncoghlan
      ncoghlan
      on Jan 11, 2020
      Contributor
      More actions

      Changed target version as per Petr's comment (PEP-573 is close to being accepted for 3.9 - it just needs some editing to improve clarity in the PEP itself, rather than needing any changes to the technical proposal)

    7. ncoghlan
      added
      3.9 (EOL)end of lifeend of life
      and removed
      3.7 (EOL)end of lifeend of life
      3.8 (EOL)end of lifeend of life
      on Jan 11, 2020
    8. encukou commented on Oct 23, 2020

      @encukou
      encukou
      on Oct 23, 2020
      Member
      More actions

      There is now PEP-630. Still not done enough to move it out of draft status, but usable for converting simple modules.

    9. encukou commented on Dec 15, 2020

      @encukou
      encukou
      on Dec 15, 2020
      Member
      More actions

      PEP-630 is now Active. I believe the vast majority of modules can now be ported, and it should be helpful for early adopters (including CPython stdlib). But there are still Open Issues and the API not battle-tested on all the edge cases.

      The PEP is written to be easily integrated into official docs when the time comes.

    10. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    11. encukou commented on Jun 4, 2025

      @encukou
      encukou
      on Jun 4, 2025
      Member
      More actions

      See PEP-573 "Module State Access from C Extension Methods" for the (hopefully) last thing that prevents me from generally recommending multi-phase init.

      the perfectionist in me still sees rough edges a few more years (and PEPs) later, but we now have critical mass. Single-phase init is legacy.

    12. encukou
      closed this as a duplicateof Docs Examples Focus on Outdated Single-Phase Init Modules and Static Types #134160 on Jun 4, 2025
    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)end of lifeend of lifedocsDocumentation in the Doc dirDocumentation in the Doc dirtype-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.