classification
Title: Document PyInterpreterState_Main().
Type: Stage: commit review
Components: Documentation Versions: Python 3.8, Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, eric.snow, nanjekyejoannah
Priority: normal Keywords: easy

Created on 2019-03-01 16:36 by eric.snow, last changed 2019-03-13 01:21 by cheryl.sabella.

Pull Requests
URL Status Linked Edit
PR 12238 open nanjekyejoannah, 2019-03-08 15:30
Messages (3)
msg336929 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2019-03-01 16:36
PyInterpreterState_Main() is a function in the public C-API that returns a pointer to the main interpreter's state.  The main interpreter is the first one created by the CPython runtime during startup (e.g. when the "python" command is run).

Documentation for PyInterpreterState_Main() should be on the "Initialization, Finalization, and Threads" page of the C-API docs, probably in the "Sub-interpreter support" section. [1]  It could also possibly go in the "Advanced Debugger Support" section. [2]

FYI, I added PyInterpreterState_Main() at PyCon US 2017 (commit f5df46d701d29baf738365da6fcf1b8a3ceabb71) when I merged Nick Coghlan's internal implementation of PEP 432.  So it has been available since 3.7.


[1] https://docs.python.org/3/c-api/init.html#sub-interpreter-support
[2] https://docs.python.org/3/c-api/init.html#advanced-debugger-support
msg336996 - (view) Author: Joannah Nanjekye (nanjekyejoannah) * (Python triager) Date: 2019-03-02 06:50
@Mariatta do you want to keep this for the mentored sprint at PyCon?
msg337496 - (view) Author: Joannah Nanjekye (nanjekyejoannah) * (Python triager) Date: 2019-03-08 15:43
Since there was no response, I decided to  open a PR for this.
History
Date User Action Args
2019-03-13 01:21:31cheryl.sabellasetstage: needs patch -> commit review
2019-03-08 15:43:45nanjekyejoannahsetkeywords: - patch

messages: + msg337496
stage: patch review -> needs patch
2019-03-08 15:30:54nanjekyejoannahsetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request12226
2019-03-02 06:50:40nanjekyejoannahsetnosy: + nanjekyejoannah
messages: + msg336996
2019-03-01 16:36:40eric.snowcreate