Skip to content

Use multi-phase initialisation (PEP 489) #345

Open

Description

@jinh-labs

CPython has recommended multi-phase initialization over legacy single-phase initialization (PyModule_Create) since Python 3.5.

Multi-phase init is also the prerequisite for sub-interpreter support: C extension modules that use single-phase init can't be imported into sub-interpreters created with concurrent.interpreters. The import fails with:

ImportError: module <name> does not support loading in subinterpreters

Thanks,
Jin

Activity

  1. jinh-labs commented on Jul 27, 2026

    @jinh-labs
    Author

    #340, #341, #342, #343 have been opened for this

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions