Repository navigation
bpo-34206: Improve docs and test coverage for pre-init functions - #8023
Conversation
- move the Py_Main documentation from the very high level API section to the initialization and finalization section - make it clear that it encapsulates a full Py_Initialize/Finalize cycle of its own - point out that exactly which settings will be read and applied correctly when called after a separate Py_Initialize or Py_InitalizeEx call is version dependent - be explicit that Py_IsInitialized can be called prior to initialization - actually test that Py_IsInitialized can be called prior to initialization
- also check Py_IsInitialized while the interpreter is initialized and after it is finalized - flush stdout in the embedding tests that run code so it appears in the expected order when running with "-vv" - make "-vv" on the subinterpreter embedding tests less spammy
|
Just noting that this is stalled pending further discussion on bpo-34008: there actually appears to be a valid use for calling |
|
Since bpo-34008 was resolved by restoring something close to the Python 3.6 behaviour, I filed a new issue (bpo-34206) to cover clarifying the documentation, and have retitled this PR accordingly. However, it still needs to be fixed to correctly describe the Python 3.6 and 3.7.1+ behaviour before it can be merged. |
commented
Jun 28, 2020
|
@vstinner Reviewing my still open assigned bpo issues, I noticed this PR was still open. I think my rationale for wanting to move the docs around a bit still holds, so I'd like to merge this for 3.10 and 3.9. |
commented
Jun 30, 2020
Sorry, I don't have the bandwidth to review it. |
left a comment
There was a problem hiding this comment.
Docs look good to me. Thanks @ncoghlan.
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
commented
Oct 8, 2024
commented
Oct 8, 2024
|
Thanks @ncoghlan for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
commented
Oct 8, 2024
|
Sorry, @ncoghlan, I could not cleanly backport this to |
commented
Oct 8, 2024
|
GH-125092 is a backport of this pull request to the 3.13 branch. |
to the initialization and finalization section
cycle of its own
correctly when called after a separate Py_Initialize or
Py_InitalizeEx call is version dependent
initialization
initialization
functions to the initialization and finalization section
listed as being safe to call prior to interpreter initialization
the traditional initialization API and the new struct-based one.
Closes #78387
https://bugs.python.org/issue34206