[issue36157] Document PyInterpreterState_Main().
New submission from Eric Snow <ericsnowcurrently@gmail.com>: 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 ---------- assignee: docs@python components: Documentation keywords: easy messages: 336929 nosy: docs@python, eric.snow priority: normal severity: normal stage: needs patch status: open title: Document PyInterpreterState_Main(). versions: Python 3.7, Python 3.8 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue36157> _______________________________________
Joannah Nanjekye <nanjekyejoannah@gmail.com> added the comment: @Mariatta do you want to keep this for the mentored sprint at PyCon? ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue36157> _______________________________________
Change by Joannah Nanjekye <nanjekyejoannah@gmail.com>: ---------- keywords: +patch pull_requests: +12226 stage: needs patch -> patch review _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue36157> _______________________________________
Joannah Nanjekye <nanjekyejoannah@gmail.com> added the comment: Since there was no response, I decided to open a PR for this. ---------- keywords: -patch stage: patch review -> needs patch _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue36157> _______________________________________
Change by Cheryl Sabella <cheryl.sabella@gmail.com>: ---------- stage: needs patch -> commit review _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue36157> _______________________________________
Eric Snow <ericsnowcurrently@gmail.com> added the comment: As I noted on the PR, this might be a good chance to make sure the C-API docs are clear about what the "main" interpreter is. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue36157> _______________________________________
Joannah Nanjekye <nanjekyejoannah@gmail.com> added the comment: I will work on this in a separate PR. I opened #issue36487 (https://bugs.python.org/issue36487) to track this. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue36157> _______________________________________
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: New changeset 8c61739defd88c7f79e86537886c33745843ce01 by Miss Islington (bot) (Joannah Nanjekye) in branch 'master': bpo-36157:Document PyInterpreterState_Main() (GH-12238) https://github.com/python/cpython/commit/8c61739defd88c7f79e86537886c3374584... ---------- nosy: +miss-islington _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue36157> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- keywords: +patch pull_requests: +12581 stage: commit review -> patch review _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue36157> _______________________________________
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: New changeset 35fc38e5e82d18ceec95af9af2103319497e2eaf by Miss Islington (bot) in branch '3.7': bpo-36157:Document PyInterpreterState_Main() (GH-12238) https://github.com/python/cpython/commit/35fc38e5e82d18ceec95af9af2103319497... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue36157> _______________________________________
Eric Snow <ericsnowcurrently@gmail.com> added the comment: Thanks for working on this, Joannah! :) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue36157> _______________________________________
participants (4)
-
Cheryl Sabella
-
Eric Snow
-
Joannah Nanjekye
-
miss-islington