This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Py_NewInterpreter docs need updating for multi-phase initialization
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.9, Python 3.8
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, miss-islington, ncoghlan, petr.viktorin
Priority: normal Keywords: patch

Created on 2019-12-30 05:18 by ncoghlan, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 17896 merged petr.viktorin, 2020-01-07 20:17
PR 17918 merged miss-islington, 2020-01-09 12:05
Messages (4)
msg359019 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2019-12-30 05:18
The Py_NewInterpreter docs only cover the behaviour of extension modules that use single-phase initialization: https://docs.python.org/3/c-api/init.html#c.Py_NewInterpreter

Multi-phase initialization allows each subinterpreter to get its own copy of extension modules as well, with only C/C++ level static and global variables being shared.
msg359510 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2020-01-07 13:23
Thanks for the report. I'll draft something better.
msg359670 - (view) Author: miss-islington (miss-islington) Date: 2020-01-09 12:05
New changeset 6c5d661342d12f6836580b0e75e3569c764527ae by Miss Islington (bot) (Petr Viktorin) in branch 'master':
bpo-39161: Document multi-phase init modules under Py_NewInterpreter() (GH-17896)
https://github.com/python/cpython/commit/6c5d661342d12f6836580b0e75e3569c764527ae
msg359671 - (view) Author: miss-islington (miss-islington) Date: 2020-01-09 12:27
New changeset 20c990229e98ad69c03e44fe61f8dce99b96cf9d by Miss Islington (bot) in branch '3.8':
bpo-39161: Document multi-phase init modules under Py_NewInterpreter() (GH-17896)
https://github.com/python/cpython/commit/20c990229e98ad69c03e44fe61f8dce99b96cf9d
History
Date User Action Args
2022-04-11 14:59:24adminsetgithub: 83342
2020-01-09 12:28:05petr.viktorinsetstatus: open -> closed
stage: patch review -> resolved
2020-01-09 12:27:42miss-islingtonsetmessages: + msg359671
2020-01-09 12:05:40miss-islingtonsetnosy: + miss-islington
messages: + msg359670
2020-01-09 12:05:40miss-islingtonsetpull_requests: + pull_request17329
2020-01-07 20:17:55petr.viktorinsetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request17312
2020-01-07 13:23:48petr.viktorinsetmessages: + msg359510
2019-12-30 05:18:47ncoghlancreate