bpo-34008: Allow to call Py_Main() after Py_Initialize()#8043
bpo-34008: Allow to call Py_Main() after Py_Initialize()#8043vstinner merged 3 commits intopython:masterfrom vstinner:init_pymain
Conversation
|
I will test this with fontforge to see if it fixes its problem. |
|
The abort is gone, however now I get: |
|
D'oh, that's what I was afraid of: fontforge is relying on the fact that While I suspect it will leak a bit of memory (but hopefully not segfault on shutdown), it's likely worth trying a variant of Victor's patch that calls |
|
Can you please point me to Victor's patch? I'm a bit lost in multiple places this is being discussed 😄 |
|
I just meant this PR :) |
|
It looks like VTK is also affected by the bug this is fixing. If I rebuild Python 3.7 with this PR, then that error goes away. |
Py_Main() can again be called after Py_Initialize(), as in Python 3.6. The new configuration is ignored, except of _PyMainInterpreterConfig.argv which is used to update sys.argv.
|
this fixes the fontforge issue |
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7. |
Py_Main() can again be called after Py_Initialize(), as in Python 3.6. The new configuration is ignored, except of _PyMainInterpreterConfig.argv which is used to update sys.argv. (cherry picked from commit fb47bca) Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
GH-8352 is a backport of this pull request to the 3.7 branch. |
|
Thanks for the review @ncoghlan! I merged my PR to master and will backport it to 3.7. |
Py_Main() can again be called after Py_Initialize(), as in Python 3.6. The new configuration is ignored, except of _PyMainInterpreterConfig.argv which is used to update sys.argv.
https://bugs.python.org/issue34008