◐ Shell
clean mode source ↗

bpo-34206: Improve docs and test coverage for pre-init functions by ncoghlan · Pull Request #8023 · python/cpython

- 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

vstinner

- 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

@ncoghlan ncoghlan changed the title bpo-34008: Py_Main and Py_IsInitialized are preinit functions bpo-34206: Py_Main and Py_IsInitialized are preinit functions [WIP - do not merge]

Jul 24, 2018

vstinner

@ncoghlan ncoghlan changed the title bpo-34206: Py_Main and Py_IsInitialized are preinit functions [WIP - do not merge] bpo-34206: Improves docs and test coverage for pre-init functions

Aug 25, 2019

@ncoghlan ncoghlan changed the title bpo-34206: Improves docs and test coverage for pre-init functions bpo-34206: Improve docs and test coverage for pre-init functions

Aug 25, 2019

@ncoghlan

@ncoghlan

ncoghlan

ncoghlan

ncoghlan

@ncoghlan

ncoghlan

@ncoghlan

ncoghlan

vstinner

willingc

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>

ncoghlan added a commit to ncoghlan/cpython that referenced this pull request

Oct 8, 2024
…ns (pythonGH-8023)

- 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 Py_Main is called after a separate runtime
  initialization 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
- 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

---------

(cherry picked from commit 7c4b6a6)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>

ncoghlan added a commit that referenced this pull request

Oct 8, 2024
…ns (GH-8023) (#125092)

- 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 Py_Main is called after a separate runtime
  initialization 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
- 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

---------

(cherry picked from commit 7c4b6a6)

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>

efimov-mikhail pushed a commit to efimov-mikhail/cpython that referenced this pull request

Oct 9, 2024
…hon#8023)

- 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 Py_Main is called after a separate runtime
  initialization 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
- 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

---------

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>