You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In resolving bpo-34008, we determined that we *do* support calling Py_Main after Py_Initialize, but it's not clear from that current documentation that this implies a Py_Finalize() call, so you don't need to call that again yourself (and it's actually an error to do so).
So this issue covers updating the draft PR I wrote at #8023 to move the Py_Main documentation into the initialization and finalization section, and clarify how it relates to the other initialization and finalization functions.
Added 3.8 back in to the target versions. However, if the automatic backport doesn't work for that branch, I'll probably skip it rather than fixing any conflicts.
PR has been updated to be suitable for 3.12/3.13/3.14 (although the deprecations in this area over the past few releases may mean the backports aren't fully automatic).
Activity
ncoghlan commentedon Jul 24, 2018
In resolving bpo-34008, we determined that we *do* support calling Py_Main after Py_Initialize, but it's not clear from that current documentation that this implies a Py_Finalize() call, so you don't need to call that again yourself (and it's actually an error to do so).
So this issue covers updating the draft PR I wrote at #8023 to move the Py_Main documentation into the initialization and finalization section, and clarify how it relates to the other initialization and finalization functions.
ncoghlan commentedon Jun 28, 2020
Adjusted target versions, as I never previously got around to merging this PR.
ncoghlan commentedon Jun 28, 2020
Added 3.8 back in to the target versions. However, if the automatic backport doesn't work for that branch, I'll probably skip it rather than fixing any conflicts.
ncoghlan commentedon Jan 14, 2024
I was reminded of this issue by https://gist.github.com/hugovk/a028d882c9bceb6410fc899ab5e4e3cf
It's still valid, since the Py_Main docs are still separate from the other initialisation and finalisation APIs: https://docs.python.org/3/c-api/veryhigh.html#c.Py_Main
PR is rather outdated, though!
ncoghlan commentedon Sep 26, 2024
PR has been updated to be suitable for 3.12/3.13/3.14 (although the deprecations in this area over the past few releases may mean the backports aren't fully automatic).
ncoghlan commentedon Oct 8, 2024
Since 3.13.0 was released before this landed, I only backported it as far as the 3.13 docs.