Proposal: Officially Deprecate Support for Legacy (Single-Phase Init) Extension Modules

The section starts with:

Extensions using the new initialization scheme are expected to support subinterpreters and multiple Py_Initialize/Py_Finalize cycles correctly, avoiding the issues mentioned in Python documentation.

I’m not sure how you can interpret that as multi-phase modules not being expected to support subinterpreters.

Anyway, the PEP is history; current docs have been saying this since 3.5:

All modules created using multi-phase initialization are expected to support sub-interpreters. Making sure multiple modules are independent is typically enough to achieve this.

1 Like